Skip to content

Commit

Permalink
chore: add another invalid .lagoon.yml to test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
smlx committed Oct 26, 2021
1 parent 7f16523 commit 09c1417
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/lagoonyml/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ func TestLint(t *testing.T) {
input: "testdata/valid.lagoon.yml",
valid: true,
},
"invalid .lagoon.yml": {
input: "testdata/invalid.lagoon.yml",
"invalid.0.lagoon.yml": {
input: "testdata/invalid.0.lagoon.yml",
valid: false,
},
"invalid.1.lagoon.yml": {
input: "testdata/invalid.1.lagoon.yml",
valid: false,
},
}
Expand Down
18 changes: 18 additions & 0 deletions internal/lagoonyml/testdata/invalid.1.lagoon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
environments:
main:
monitoring_urls:
- "https://www.example.com"
- "https://www.example.com/special_page"
routes:
- nginx:
- example.com
- "www.example.com":
tls-acme: 'true'
insecure: Redirect
hsts: max-age=31536000
- "example.com":
annotations:
nginx.ingress.kubernetes.io/server-snippet: |
rewrite ^/redirect-test(.*) https://www.example.com/redirect-test$1 permanent;
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Strict-Transport-Security: max-age=31536000; includeSubDomains";

0 comments on commit 09c1417

Please sign in to comment.