Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
fix(resource-service): Remove token enforcement (#8040) (#8206)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisthat committed Jun 27, 2022
1 parent 8e95da1 commit 6585037
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions resource-service/common/credentials_test.go
Expand Up @@ -76,9 +76,8 @@ func TestK8sCredentialReader_ReadSecretNoToken(t *testing.T) {
))

secret, err := secretReader.GetCredentials("my-project")

require.ErrorIs(t, err, errors.ErrCredentialsTokenMustNotBeEmpty)
require.Nil(t, secret)
require.Nil(t, err)
require.NotNil(t, secret)
}

func TestK8sCredentialReader_ReadSecretNoPrivateKey(t *testing.T) {
Expand Down
3 changes: 0 additions & 3 deletions resource-service/common_models/git.go
Expand Up @@ -65,8 +65,5 @@ func (g GitCredentials) validateRemoteURIAndToken() error {
if err != nil {
return kerrors.ErrCredentialsInvalidRemoteURI
}
if g.Token == "" {
return kerrors.ErrCredentialsTokenMustNotBeEmpty
}
return nil
}
2 changes: 1 addition & 1 deletion resource-service/common_models/git_test.go
Expand Up @@ -32,7 +32,7 @@ func TestGitCredentials_Validate(t *testing.T) {
Token: "",
RemoteURI: "https://my-repo",
},
wantErr: true,
wantErr: false,
},
{
name: "invalid URI",
Expand Down

0 comments on commit 6585037

Please sign in to comment.