diff --git a/.github/workflows/k3d-verify-warden-manifest.yaml b/.github/workflows/warden-verify.yaml similarity index 53% rename from .github/workflows/k3d-verify-warden-manifest.yaml rename to .github/workflows/warden-verify.yaml index 1ae710d4..d149367a 100644 --- a/.github/workflows/k3d-verify-warden-manifest.yaml +++ b/.github/workflows/warden-verify.yaml @@ -1,4 +1,4 @@ -name: k3d integration test +name: warden verify on: push: @@ -7,10 +7,30 @@ on: pull_request: jobs: - k3d-integration-test: - + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + cache: true + - uses: golangci/golangci-lint-action@v3 + with: + version: v1.54 + unit-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + cache: true + - name: unit test + run: make test + integration-test: + needs: unit-test runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - name: Create Single Cluster diff --git a/internal/validate/pod_test.go b/internal/validate/pod_test.go index 57ca760f..5fc073e2 100644 --- a/internal/validate/pod_test.go +++ b/internal/validate/pod_test.go @@ -3,6 +3,8 @@ package validate_test import ( "context" "fmt" + "testing" + "github.com/kyma-project/warden/internal/validate" "github.com/kyma-project/warden/internal/validate/mocks" "github.com/kyma-project/warden/pkg" @@ -11,7 +13,6 @@ import ( "github.com/stretchr/testify/require" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "testing" ) func TestValidatePod(t *testing.T) { @@ -162,7 +163,7 @@ func TestValidatePod(t *testing.T) { //THEN require.NoError(t, err) require.Equal(t, testCase.expectedStatus, result.Status) - require.EqualValues(t, testCase.expectedFailedImages, result.InvalidImages) + require.ElementsMatchf(t, testCase.expectedFailedImages, result.InvalidImages, "list of images do not match") }) } }