Skip to content

Commit

Permalink
fix(test): nil secret in argument
Browse files Browse the repository at this point in the history
  • Loading branch information
leonsteinhaeuser committed May 2, 2024
1 parent 8ce0ec0 commit b8c53f9
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions pkg/util/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,49 +548,6 @@ func TestUpdateSecret(t *testing.T) {
},
wantErr: false,
},
{
name: "with nil secret",
args: args{
ctx: context.Background(),
clnt: client,
scheme: scheme,
pbscrt: &passboltv1.PassboltSecret{
ObjectMeta: metav1.ObjectMeta{
Name: "test",
Namespace: "default",
},
Spec: passboltv1.PassboltSecretSpec{
SecretType: corev1.SecretTypeOpaque,
PassboltSecrets: map[string]passboltv1.PassboltSecretRef{
"test": {
ID: "184734ea-8be3-4f5a-ba6c-5f4b3c0603e8",
Field: passboltv1.FieldNameUsername,
},
},
},
},
secret: nil,
},
want: &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "test",
Namespace: "default",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "passbolt.tagesspiegel.de/v1",
Kind: "PassboltSecret",
Name: "test",
Controller: func() *bool { b := true; return &b }(),
BlockOwnerDeletion: func() *bool { b := true; return &b }(),
},
},
},
Data: map[string][]byte{
"test": []byte(`admin`),
},
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit b8c53f9

Please sign in to comment.