chore: move CAOS_OIDC_DEV to const (and ensure TestValidateIssuer runs (even on machines with env set))
This commit is contained in:
parent
b311610d06
commit
d6203fb0d5
2 changed files with 6 additions and 2 deletions
|
@ -60,6 +60,8 @@ func TestValidateIssuer(t *testing.T) {
|
|||
true,
|
||||
},
|
||||
}
|
||||
//ensure env is not set
|
||||
os.Unsetenv(OidcDevMode)
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if err := ValidateIssuer(tt.args.issuer); (err != nil) != tt.wantErr {
|
||||
|
@ -84,7 +86,7 @@ func TestValidateIssuerDevLocalAllowed(t *testing.T) {
|
|||
false,
|
||||
},
|
||||
}
|
||||
os.Setenv("CAOS_OIDC_DEV", "")
|
||||
os.Setenv(OidcDevMode, "true")
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if err := ValidateIssuer(tt.args.issuer); (err != nil) != tt.wantErr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue