mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-14 11:57:59 +00:00
Fix SonarCube codesmell
This commit is contained in:
parent
16839c6ce1
commit
2c6dde34f7
2 changed files with 18 additions and 8 deletions
|
@ -46,6 +46,11 @@ type secretManagerTestCase struct {
|
|||
expectedData map[string][]byte
|
||||
}
|
||||
|
||||
const (
|
||||
testSecret = "test-secret"
|
||||
defaultVersion = "default"
|
||||
)
|
||||
|
||||
func makeValidSecretManagerTestCase() *secretManagerTestCase {
|
||||
smtc := secretManagerTestCase{
|
||||
mockClient: &fakesm.IBMMockClient{},
|
||||
|
@ -65,16 +70,16 @@ func makeValidSecretManagerTestCase() *secretManagerTestCase {
|
|||
|
||||
func makeValidRef() *esv1alpha1.ExternalSecretDataRemoteRef {
|
||||
return &esv1alpha1.ExternalSecretDataRemoteRef{
|
||||
Key: "test-secret",
|
||||
Version: "default",
|
||||
Key: testSecret,
|
||||
Version: defaultVersion,
|
||||
}
|
||||
}
|
||||
|
||||
func makeValidRefFrom() *esv1alpha1.ExternalSecretDataFromRemoteRef {
|
||||
return &esv1alpha1.ExternalSecretDataFromRemoteRef{
|
||||
Extract: esv1alpha1.ExternalSecretExtract{
|
||||
Key: "test-secret",
|
||||
Version: "default",
|
||||
Key: testSecret,
|
||||
Version: defaultVersion,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,11 @@ type vaultTestCase struct {
|
|||
expectedData map[string][]byte
|
||||
}
|
||||
|
||||
const (
|
||||
testSecret = "test-secret"
|
||||
defaultVersion = "default"
|
||||
)
|
||||
|
||||
func makeValidVaultTestCase() *vaultTestCase {
|
||||
smtc := vaultTestCase{
|
||||
mockClient: &fakeoracle.OracleMockClient{},
|
||||
|
@ -57,16 +62,16 @@ func makeValidVaultTestCase() *vaultTestCase {
|
|||
|
||||
func makeValidRef() *esv1alpha1.ExternalSecretDataRemoteRef {
|
||||
return &esv1alpha1.ExternalSecretDataRemoteRef{
|
||||
Key: "test-secret",
|
||||
Version: "default",
|
||||
Key: testSecret,
|
||||
Version: defaultVersion,
|
||||
}
|
||||
}
|
||||
|
||||
func makeValidRefFrom() *esv1alpha1.ExternalSecretDataFromRemoteRef {
|
||||
return &esv1alpha1.ExternalSecretDataFromRemoteRef{
|
||||
Extract: esv1alpha1.ExternalSecretExtract{
|
||||
Key: "test-secret",
|
||||
Version: "default",
|
||||
Key: testSecret,
|
||||
Version: defaultVersion,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue