From 4c2a16904ce3a4a790d9674dff743de6926dffe1 Mon Sep 17 00:00:00 2001 From: shivkumar dudhani Date: Tue, 10 Dec 2019 09:15:50 -0800 Subject: [PATCH] update tests --- pkg/engine/overlayCondition_test.go | 6 +++--- pkg/engine/overlay_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/engine/overlayCondition_test.go b/pkg/engine/overlayCondition_test.go index 9b78c74c07..af0cd3a42d 100644 --- a/pkg/engine/overlayCondition_test.go +++ b/pkg/engine/overlayCondition_test.go @@ -194,7 +194,7 @@ func TestMeetConditions_anchosInSameObject(t *testing.T) { json.Unmarshal(overlayRaw, &overlay) _, err := meetConditions(resource, overlay) - assert.Error(t, err, "[overlayError:0] failed validating value 443 with overlay 444") + assert.Error(t, err, "[overlayError:0] Failed validating value 443 with overlay 444") } func TestMeetConditions_anchorOnPeer(t *testing.T) { @@ -444,7 +444,7 @@ func TestMeetConditions_anchorsOnPeer_two(t *testing.T) { json.Unmarshal(overlayRaw, &overlay) _, err := meetConditions(resource, overlay) - assert.Error(t, err, "[overlayError:0] failed validating value true with overlay false") + assert.Error(t, err, "[overlayError:0] Failed validating value true with overlay false") overlayRaw = []byte(`{ "spec": { @@ -594,7 +594,7 @@ func TestMeetConditions_anchorsOnPeer_multiple(t *testing.T) { json.Unmarshal(overlayRaw, &overlay) _, err = meetConditions(resource, overlay) - assert.Error(t, err, "[overlayError:0] failed validating value ENV_VALUE with overlay ENV_VALUE1") + assert.Error(t, err, "[overlayError:0] Failed validating value ENV_VALUE with overlay ENV_VALUE1") } func TestMeetConditions_AtleastOneExist(t *testing.T) { diff --git a/pkg/engine/overlay_test.go b/pkg/engine/overlay_test.go index 54cadfc7ed..fc93f7e052 100644 --- a/pkg/engine/overlay_test.go +++ b/pkg/engine/overlay_test.go @@ -494,7 +494,7 @@ func TestProcessOverlayPatches_ImagePullPolicy(t *testing.T) { json.Unmarshal(overlayRaw, &overlay) patches, err = processOverlayPatches(resource, overlay) - assert.Error(t, err, "[overlayError:0] Conditions are not met at /spec/template/metadata/labels/app/, [overlayError:0] failed validating value nginx with overlay nginx1") + assert.Error(t, err, "[overlayError:0] Policy not applied, conditions are not met at /spec/template/metadata/labels/app/, [overlayError:0] Failed validating value nginx with overlay nginx1") assert.Assert(t, len(patches) == 0) } @@ -807,7 +807,7 @@ func TestProcessOverlayPatches_anchorOnPeer(t *testing.T) { json.Unmarshal(overlayRaw, &overlay) patches, err = processOverlayPatches(resource, overlay) - assert.Error(t, err, "[overlayError:0] Conditions are not met at /subsets/0/ports/0/port/, [overlayError:0] failed validating value 443 with overlay 444") + assert.Error(t, err, "[overlayError:0] Policy not applied, conditions are not met at /subsets/0/ports/0/port/, [overlayError:0] Failed validating value 443 with overlay 444") assert.Assert(t, len(patches) == 0) }