Skip to content

Commit

Permalink
fix: unit test assertion
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault committed Nov 29, 2023
1 parent e4308b2 commit b54b00f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions tests/artifactoryremoterepository_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package tests

import (
"github.com/jfrog/jfrog-client-go/utils"
"strings"
"testing"

"github.com/jfrog/jfrog-client-go/utils"

"github.com/jfrog/jfrog-client-go/artifactory/services"
"github.com/stretchr/testify/assert"
)
Expand Down Expand Up @@ -818,7 +819,9 @@ func remoteTerraformTest(t *testing.T) {

err = testsUpdateRemoteRepositoryService.Terraform(srp)
assert.NoError(t, err, "Failed to update "+repoKey)
validateRepoConfig(t, repoKey, srp)
if assert.NoError(t, err, "Failed to update "+repoKey) {
validateRepoConfig(t, repoKey, srp)
}
}

func remoteVcsTest(t *testing.T) {
Expand Down
10 changes: 8 additions & 2 deletions tests/artifactoryvirtualrepository_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package tests

import (
"github.com/jfrog/jfrog-client-go/utils"
"testing"

"github.com/jfrog/jfrog-client-go/utils"

"github.com/jfrog/jfrog-client-go/artifactory/services"
"github.com/stretchr/testify/assert"
)
Expand Down Expand Up @@ -167,7 +168,9 @@ func virtualComposerTest(t *testing.T) {

err = testsUpdateVirtualRepositoryService.Composer(cvp)
assert.NoError(t, err, "Failed to update "+repoKey)
validateRepoConfig(t, repoKey, cvp)
if assert.NoError(t, err, "Failed to update "+repoKey) {
validateRepoConfig(t, repoKey, cvp)
}
}

func virtualConanTest(t *testing.T) {
Expand Down Expand Up @@ -672,6 +675,9 @@ func virtualTerraformTest(t *testing.T) {
err = testsUpdateVirtualRepositoryService.Terraform(avp)
assert.NoError(t, err, "Failed to update "+repoKey)
validateRepoConfig(t, repoKey, avp)
if assert.NoError(t, err, "Failed to update "+repoKey) {
validateRepoConfig(t, repoKey, avp)
}
}

func virtualYumTest(t *testing.T) {
Expand Down

0 comments on commit b54b00f

Please sign in to comment.