Skip to content

Commit

Permalink
Add broken test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ebdekock committed May 30, 2024
1 parent f026e85 commit 6d4ba5a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions controllers/vaultdynamicsecret_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,38 @@ func Test_artificialDelay(t *testing.T) {
want: 2,
wantErr: assert.NoError,
},
{
name: "with-broken-env",
envs: map[string]string{
"ARTIFICIAL_DELAY": "rubbish",
},
fields: fields{
Client: fake.NewClientBuilder().Build(),
runtimePodUID: "",
},
args: args{
ctx: nil,
vClient: &vault.MockRecordingVaultClient{},
o: &secretsv1beta1.VaultDynamicSecret{
ObjectMeta: metav1.ObjectMeta{
Name: "baz",
Namespace: "default",
},
Spec: secretsv1beta1.VaultDynamicSecretSpec{
Mount: "baz",
Path: "foo",
Destination: secretsv1beta1.Destination{
Name: "baz",
Create: true,
},
},

Status: secretsv1beta1.VaultDynamicSecretStatus{},
},
},
want: 60,
wantErr: assert.NoError,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 6d4ba5a

Please sign in to comment.