Signed-off-by: Pedro Parra Ortega <pedro.parraortega@enreach.com>
@@ -315,9 +315,6 @@ func (c *Client) findSecretByID(id string) (*ksm.Record, error) {
if len(records) == 0 {
return nil, errors.New(errKeeperSecurityNoSecretsFound)
}
- if len(records) > 1 {
- return nil, fmt.Errorf(errKeeperSecuritySecretNotUnique, id)
- }
return records[0], nil
@@ -324,7 +324,8 @@ func TestClientGetSecret(t *testing.T) {
Key: record0,
},
- wantErr: true,
+ want: []byte(outputRecord0),
+ wantErr: false,
{
name: "Get non existing secret",
@@ -35,7 +35,6 @@ const (
errKeeperSecurityNilSpec = "nil spec"
errKeeperSecurityNilSpecProvider = "nil spec.provider"
errKeeperSecurityNilSpecProviderKeeperSecurity = "nil spec.provider.keepersecurity"
- errKeeperSecurityStoreMissingAuth = "missing: spec.provider.keepersecurity.auth"
errKeeperSecurityStoreMissingFolderID = "missing: spec.provider.keepersecurity.folderID"
)