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
|
expectedData map[string][]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
testSecret = "test-secret"
|
||||||
|
defaultVersion = "default"
|
||||||
|
)
|
||||||
|
|
||||||
func makeValidSecretManagerTestCase() *secretManagerTestCase {
|
func makeValidSecretManagerTestCase() *secretManagerTestCase {
|
||||||
smtc := secretManagerTestCase{
|
smtc := secretManagerTestCase{
|
||||||
mockClient: &fakesm.IBMMockClient{},
|
mockClient: &fakesm.IBMMockClient{},
|
||||||
|
@ -65,16 +70,16 @@ func makeValidSecretManagerTestCase() *secretManagerTestCase {
|
||||||
|
|
||||||
func makeValidRef() *esv1alpha1.ExternalSecretDataRemoteRef {
|
func makeValidRef() *esv1alpha1.ExternalSecretDataRemoteRef {
|
||||||
return &esv1alpha1.ExternalSecretDataRemoteRef{
|
return &esv1alpha1.ExternalSecretDataRemoteRef{
|
||||||
Key: "test-secret",
|
Key: testSecret,
|
||||||
Version: "default",
|
Version: defaultVersion,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeValidRefFrom() *esv1alpha1.ExternalSecretDataFromRemoteRef {
|
func makeValidRefFrom() *esv1alpha1.ExternalSecretDataFromRemoteRef {
|
||||||
return &esv1alpha1.ExternalSecretDataFromRemoteRef{
|
return &esv1alpha1.ExternalSecretDataFromRemoteRef{
|
||||||
Extract: esv1alpha1.ExternalSecretExtract{
|
Extract: esv1alpha1.ExternalSecretExtract{
|
||||||
Key: "test-secret",
|
Key: testSecret,
|
||||||
Version: "default",
|
Version: defaultVersion,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,11 @@ type vaultTestCase struct {
|
||||||
expectedData map[string][]byte
|
expectedData map[string][]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
testSecret = "test-secret"
|
||||||
|
defaultVersion = "default"
|
||||||
|
)
|
||||||
|
|
||||||
func makeValidVaultTestCase() *vaultTestCase {
|
func makeValidVaultTestCase() *vaultTestCase {
|
||||||
smtc := vaultTestCase{
|
smtc := vaultTestCase{
|
||||||
mockClient: &fakeoracle.OracleMockClient{},
|
mockClient: &fakeoracle.OracleMockClient{},
|
||||||
|
@ -57,16 +62,16 @@ func makeValidVaultTestCase() *vaultTestCase {
|
||||||
|
|
||||||
func makeValidRef() *esv1alpha1.ExternalSecretDataRemoteRef {
|
func makeValidRef() *esv1alpha1.ExternalSecretDataRemoteRef {
|
||||||
return &esv1alpha1.ExternalSecretDataRemoteRef{
|
return &esv1alpha1.ExternalSecretDataRemoteRef{
|
||||||
Key: "test-secret",
|
Key: testSecret,
|
||||||
Version: "default",
|
Version: defaultVersion,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeValidRefFrom() *esv1alpha1.ExternalSecretDataFromRemoteRef {
|
func makeValidRefFrom() *esv1alpha1.ExternalSecretDataFromRemoteRef {
|
||||||
return &esv1alpha1.ExternalSecretDataFromRemoteRef{
|
return &esv1alpha1.ExternalSecretDataFromRemoteRef{
|
||||||
Extract: esv1alpha1.ExternalSecretExtract{
|
Extract: esv1alpha1.ExternalSecretExtract{
|
||||||
Key: "test-secret",
|
Key: testSecret,
|
||||||
Version: "default",
|
Version: defaultVersion,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue