diff --git a/cmd/identify_ingress_test.go b/cmd/identify_ingress_test.go index 4f9bd33d..e0f443ef 100644 --- a/cmd/identify_ingress_test.go +++ b/cmd/identify_ingress_test.go @@ -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) {