Skip to content

Commit

Permalink
Merge pull request #43 from uselagoon/test-autogenonly
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Jun 9, 2022
2 parents e2903e0 + 7de1754 commit 7fc78bb
Show file tree
Hide file tree
Showing 2 changed files with 27 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker-compose-yaml: test-resources/template-ingress/docker-compose.yml

environment_variables:
git_sha: "true"

0 comments on commit 7fc78bb

Please sign in to comment.