Skip to content

Commit

Permalink
test: add test for only autogen routes
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Jun 9, 2022
1 parent e2903e0 commit 10b95ca
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cmd/identify_ingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,28 @@ func TestIdentifyRoute(t *testing.T) {
wantautoGen: []string{},
wantJSON: `{"primary":"https://example.com","secondary":["https://example.com"],"autogenerated":[]}`,
},
{
name: "test13 only autogenerated route",
args: args{
alertContact: "alertcontact",
statusPageID: "statuspageid",
projectName: "example-project",
environmentName: "main",
environmentType: "production",
buildType: "branch",
lagoonVersion: "v2.7.x",
branch: "main",
projectVars: `[{"name":"LAGOON_SYSTEM_ROUTER_PATTERN","value":"${service}-${project}-${environment}.example.com","scope":"internal_system"}]`,
envVars: `[]`,
secretPrefix: "fastly-api-",
lagoonYAML: "test-resources/template-ingress/single-lagoon-onlyautogen.yml",
templatePath: "test-resources/template-ingress/output",
},
want: "https://node-example-project-main.example.com",
wantRemain: []string{"https://node-example-project-main.example.com"},
wantautoGen: []string{"https://node-example-project-main.example.com"},
wantJSON: `{"primary":"https://node-example-project-main.example.com","secondary":["https://node-example-project-main.example.com"],"autogenerated":["https://node-example-project-main.example.com"]}`,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 10b95ca

Please sign in to comment.