From 72416dffe7ea1a36ab461031c2e79af96dfa8c02 Mon Sep 17 00:00:00 2001 From: Ahmed El-Sayed Date: Tue, 20 Dec 2022 11:45:55 +0200 Subject: [PATCH] fix integration test --- test/integration/test_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/integration/test_test.go b/test/integration/test_test.go index 835ed7fa..f3f66b41 100644 --- a/test/integration/test_test.go +++ b/test/integration/test_test.go @@ -228,7 +228,7 @@ func TestIntegration(t *testing.T) { }) t.Run("test mutate resources", func(t *testing.T) { - raw, err := ioutil.ReadFile("data/resources/mutation_test-resources.yaml") + raw, err := ioutil.ReadFile("data/resources/mutation_test_resources.yaml") assert.Nil(t, err) var m map[string]interface{} @@ -236,15 +236,14 @@ func TestIntegration(t *testing.T) { assert.Nil(t, err) spec := m["spec"].(map[string]interface{}) - assert.Equal(t, spec["replicas"], float64(1)) + assert.Equal(t, int64(1), spec["replicas"]) - err = kubectl("apply", "-f", "data/resources/mutation_test-resources.yaml") + err = kubectl("apply", "-f", "data/resources/mutation_test_resources.yaml") assert.NotNil(t, err) var deployment appsv1.Deployment err = cl.Get(ctx, client.ObjectKey{Name: testMutationDeployment, Namespace: "default"}, &deployment) assert.NotNil(t, err) - assert.Nil(t, deployment) var policy v2beta2.Policy err = cl.Get(ctx, client.ObjectKey{Name: minimumReplicaCountPolicy}, &policy)