diff --git a/applicationset/services/pull_request/scm-manager_test.go b/applicationset/services/pull_request/scm-manager_test.go index eabce92f00e33a..db3563f358792d 100644 --- a/applicationset/services/pull_request/scm-manager_test.go +++ b/applicationset/services/pull_request/scm-manager_test.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "io" "net/http" "net/http/httptest" @@ -97,9 +98,9 @@ func TestScmManagerPrList(t *testing.T) { })) defer ts.Close() host, err := NewScmManagerService(context.Background(), "", ts.URL, "test-argocd", "pr-test", false, "", nil) - assert.NoError(t, err) + require.NoError(t, err) prs, err := host.List(context.Background()) - assert.NoError(t, err) + require.NoError(t, err) assert.Len(t, prs, 1) assert.Equal(t, 1, prs[0].Number) assert.Equal(t, "test_pr", prs[0].Branch) diff --git a/applicationset/services/scm_provider/scm-manager_test.go b/applicationset/services/scm_provider/scm-manager_test.go index 178959ed4c2886..7dcf3c1a8df705 100644 --- a/applicationset/services/scm_provider/scm-manager_test.go +++ b/applicationset/services/scm_provider/scm-manager_test.go @@ -142,7 +142,7 @@ func TestScmManagerListRepos(t *testing.T) { if c.hasError { assert.Error(t, err) } else { - assert.NoError(t, err) + require.NoError(t, err) repos := []*Repository{} branches := []string{} for _, r := range rawRepos { @@ -175,19 +175,19 @@ func TestScmManagerHasPath(t *testing.T) { t.Run("file exists", func(t *testing.T) { ok, err := host.RepoHasPath(context.Background(), repo, "README.md") - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, ok) }) t.Run("directory exists", func(t *testing.T) { ok, err := host.RepoHasPath(context.Background(), repo, "build") - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, ok) }) t.Run("does not exists", func(t *testing.T) { ok, err := host.RepoHasPath(context.Background(), repo, "unknownFile") - assert.NoError(t, err) + require.NoError(t, err) assert.False(t, ok) }) }