Skip to content

Commit

Permalink
fix: ignore empty secret ref
Browse files Browse the repository at this point in the history
  • Loading branch information
vsukhin committed Nov 2, 2023
1 parent b8f6293 commit 26b34b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/mapper/tests/openapi_kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ func MapContentToSpecContent(content *testkube.TestContent) (specContent *testsv
AuthType: testsv3.GitAuthType(content.Repository.AuthType),
}

if content.Repository.UsernameSecret != nil {
if content.Repository.UsernameSecret != nil && !content.Repository.UsernameSecret.IsEmpty() {
repository.UsernameSecret = &testsv3.SecretRef{
Name: content.Repository.UsernameSecret.Name,
Key: content.Repository.UsernameSecret.Key,
}
}

if content.Repository.TokenSecret != nil {
if content.Repository.TokenSecret != nil && !content.Repository.TokenSecret.IsEmpty() {
repository.TokenSecret = &testsv3.SecretRef{
Name: content.Repository.TokenSecret.Name,
Key: content.Repository.TokenSecret.Key,
Expand Down

0 comments on commit 26b34b8

Please sign in to comment.