1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

fix: fix slice assignment issue (#3964)

Signed-off-by: cuishuang <imcusg@gmail.com>
Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
This commit is contained in:
cui fliter 2024-10-02 02:58:23 +08:00 committed by GitHub
parent 0d0c143566
commit 62353be9ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1415,11 +1415,8 @@ func TestAzureKeyVaultSecretManagerGetAllSecrets(t *testing.T) {
Attributes: &enabledAtt, Attributes: &enabledAtt,
} }
secretList := make([]keyvault.SecretItem, 0)
secretList = append(secretList, secretItem)
list := keyvault.SecretListResult{ list := keyvault.SecretListResult{
Value: &secretList, Value: &[]keyvault.SecretItem{secretItem},
} }
resultPage := keyvault.NewSecretListResultPage(list, getNextPage) resultPage := keyvault.NewSecretListResultPage(list, getNextPage)
@ -1447,11 +1444,8 @@ func TestAzureKeyVaultSecretManagerGetAllSecrets(t *testing.T) {
Attributes: &enabledAtt, Attributes: &enabledAtt,
} }
secretList := make([]keyvault.SecretItem, 1)
secretList = append(secretList, secretItemOne, secretItemTwo)
list := keyvault.SecretListResult{ list := keyvault.SecretListResult{
Value: &secretList, Value: &[]keyvault.SecretItem{secretItemOne, secretItemTwo},
} }
resultPage := keyvault.NewSecretListResultPage(list, getNextPage) resultPage := keyvault.NewSecretListResultPage(list, getNextPage)
@ -1475,11 +1469,8 @@ func TestAzureKeyVaultSecretManagerGetAllSecrets(t *testing.T) {
Tags: map[string]*string{"environment": &environment}, Tags: map[string]*string{"environment": &environment},
} }
secretList := make([]keyvault.SecretItem, 0)
secretList = append(secretList, secretItem)
list := keyvault.SecretListResult{ list := keyvault.SecretListResult{
Value: &secretList, Value: &[]keyvault.SecretItem{secretItem},
} }
resultPage := keyvault.NewSecretListResultPage(list, getNextPage) resultPage := keyvault.NewSecretListResultPage(list, getNextPage)
@ -1505,11 +1496,8 @@ func TestAzureKeyVaultSecretManagerGetAllSecrets(t *testing.T) {
Tags: map[string]*string{"environment": &environment, "author": &author}, Tags: map[string]*string{"environment": &environment, "author": &author},
} }
secretList := make([]keyvault.SecretItem, 0)
secretList = append(secretList, secretItem)
list := keyvault.SecretListResult{ list := keyvault.SecretListResult{
Value: &secretList, Value: &[]keyvault.SecretItem{secretItem},
} }
resultPage := keyvault.NewSecretListResultPage(list, getNextPage) resultPage := keyvault.NewSecretListResultPage(list, getNextPage)