Skip to content

Commit 4b3c295

Browse files
committed
Add auth basic secrets tests
1 parent 87b43aa commit 4b3c295

File tree

5 files changed

+70
-34
lines changed

5 files changed

+70
-34
lines changed

hack/secrets.json

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@
670670
"/tests/data/auth-basic-auth-mergeable/auth-basic-minion-secret-updated.yaml"
671671
],
672672
"usedIn": [
673-
"tests/suite/test_auth_basic_auth_mergeable.py - needed for auth basic tests"
673+
"tests/suite/test_auth_basic_auth_mergeable.py - needed for auth basic mergeable tests"
674674
]
675675
},
676676
{
@@ -691,8 +691,8 @@
691691
"/tests/data/auth-basic-policy/secret/htpasswd-secret-invalid.yaml"
692692
],
693693
"usedIn": [
694-
"tests/suite/test_auth_basic_policies.py - needed for invalid auth basic tests",
695-
"tests/suite/test_auth_basic_policies_vsr.py - needed for invalid auth basic tests"
694+
"tests/suite/test_auth_basic_policies.py - needed for invalid auth basic policy tests",
695+
"tests/suite/test_auth_basic_policies_vsr.py - needed for invalid auth basic policy tests"
696696
]
697697
},
698698
{
@@ -703,8 +703,8 @@
703703
"/tests/data/auth-basic-policy/secret/htpasswd-secret-valid-empty.yaml"
704704
],
705705
"usedIn": [
706-
"tests/suite/test_auth_basic_policies.py - needed for empty auth basic tests",
707-
"tests/suite/test_auth_basic_policies_vsr.py - needed for empty auth basic tests"
706+
"tests/suite/test_auth_basic_policies.py - needed for empty auth basic policy tests",
707+
"tests/suite/test_auth_basic_policies_vsr.py - needed for empty auth basic policy tests"
708708
]
709709
},
710710
{
@@ -724,8 +724,61 @@
724724
"/tests/data/auth-basic-policy/secret/htpasswd-secret-valid.yaml"
725725
],
726726
"usedIn": [
727-
"tests/suite/test_auth_basic_policies.py - needed for valid auth basic tests",
728-
"tests/suite/test_auth_basic_policies_vsr.py - needed for valid auth basic tests"
727+
"tests/suite/test_auth_basic_policies.py - needed for valid auth basic policy tests",
728+
"tests/suite/test_auth_basic_policies_vsr.py - needed for valid auth basic policy tests"
729+
]
730+
},
731+
{
732+
"secretName": "auth-basic-secrets-key",
733+
"fileName": "auth-basic-secrets-htpasswd-secret.yaml",
734+
"entries": [
735+
{
736+
"username": "foo",
737+
"password": "bar"
738+
}
739+
],
740+
"symlinks": [
741+
"/tests/data/auth-basic-secrets/auth-basic-secret.yaml"
742+
],
743+
"usedIn": [
744+
"tests/suite/test_auth_basic_secrets.py - needed for auth basic secret tests"
745+
]
746+
},
747+
{
748+
"secretName": "auth-basic-secrets-key",
749+
"fileName": "auth-basic-secrets-htpasswd-secret-updated.yaml",
750+
"entries": [
751+
{
752+
"username": "qux",
753+
"password": "quux"
754+
}
755+
],
756+
"symlinks": [
757+
"/tests/data/auth-basic-secrets/auth-basic-secret-updated.yaml"
758+
],
759+
"usedIn": [
760+
"tests/suite/test_auth_basic_secrets.py - needed for updated auth basic secret tests"
761+
]
762+
},
763+
{
764+
"secretName": "auth-basic-secrets-key",
765+
"fileName": "auth-basic-secrets-htpasswd-secret-invalid.yaml",
766+
"entries": [
767+
{
768+
"username": "foo",
769+
"password": "bar"
770+
},
771+
{
772+
"username": "qux",
773+
"password": "quux"
774+
}
775+
],
776+
"htpasswdKey": "invalid-htpasswd",
777+
"symlinks": [
778+
"/tests/data/auth-basic-secrets/auth-basic-secret-invalid.yaml"
779+
],
780+
"usedIn": [
781+
"tests/suite/test_auth_basic_secrets.py - needed for invalid auth basic secret tests"
729782
]
730783
}
731784
]

tests/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ json_files/*
2727
# see ../hack/certs.go
2828
data/ap-waf-grpc/tls-secret.yaml
2929
data/appprotect/appprotect-secret.yaml
30+
data/auth-basic-auth-mergeable/auth-basic-master-secret.yaml
31+
data/auth-basic-auth-mergeable/auth-basic-master-secret-updated.yaml
32+
data/auth-basic-auth-mergeable/auth-basic-minion-secret.yaml
33+
data/auth-basic-auth-mergeable/auth-basic-minion-secret-updated.yaml
34+
data/auth-basic-policy/secret/htpasswd-secret-invalid.yaml
35+
data/auth-basic-policy/secret/htpasswd-secret-valid.yaml
36+
data/auth-basic-policy/secret/htpasswd-secret-valid-empty.yaml
37+
data/auth-basic-secrets/auth-basic-secret.yaml
38+
data/auth-basic-secrets/auth-basic-secret-invalid.yaml
39+
data/auth-basic-secrets/auth-basic-secret-updated.yaml
3040
data/common/app/secure/secret/app-tls-secret.yaml
3141
data/common/app/secure/secret/grpc-secret.yaml
3242
data/common/app/secure-ca/app-tls-secret.yaml

tests/data/auth-basic-secrets/auth-basic-secret-invalid.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/data/auth-basic-secrets/auth-basic-secret-updated.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/data/auth-basic-secrets/auth-basic-secret.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)