From 94174f17d9bbc8187f668e1656527473c38e9d4c Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Wed, 4 Sep 2019 14:30:03 -0700 Subject: Fix test failure in threaded tests Fix bug in tests where they can fail in highly threaded environments where a file can be accessed by two test processes. Fixed it by duplicating the test case. Issue-ID: MULTICLOUD-689 Change-Id: I93b9862fac52eb307e52c355e3cb0d4332768b4f Signed-off-by: Kiran Kamineni --- src/k8splugin/internal/helm/helm_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/k8splugin/internal/helm/helm_test.go') diff --git a/src/k8splugin/internal/helm/helm_test.go b/src/k8splugin/internal/helm/helm_test.go index a13c67ba..f95c0fd5 100644 --- a/src/k8splugin/internal/helm/helm_test.go +++ b/src/k8splugin/internal/helm/helm_test.go @@ -27,7 +27,7 @@ import ( func TestProcessValues(t *testing.T) { - chartDir := "../../mock_files/mock_charts/testchart1" + chartDir := "../../mock_files/mock_charts/testchart2" profileDir := "../../mock_files/mock_profiles/profile1" testCases := []struct { @@ -105,7 +105,7 @@ func TestProcessValues(t *testing.T) { func TestGenerateKubernetesArtifacts(t *testing.T) { - chartDir := "../../mock_files/mock_charts/testchart1" + chartDir := "../../mock_files/mock_charts/testchart2" profileDir := "../../mock_files/mock_profiles/profile1" testCases := []struct { @@ -123,7 +123,7 @@ func TestGenerateKubernetesArtifacts(t *testing.T) { values: []string{}, //sha256 hash of the evaluated templates in each chart expectedHashMap: map[string]string{ - "testchart1/templates/service.yaml": "bbd7257d1f6ab958680e642a8fbbbea2002ebbaa9276fb51fbd71b4b66a772cc", + "testchart2/templates/service.yaml": "fdd6a2b6795486f0dd1d8c44379afb5ffe4072c09f9cf6594738e8ded4dd872d", "subcharta/templates/service.yaml": "570389588fffdb7193ab265888d781f3d751f3a40362533344f9aa7bb93a8bb0", "subchartb/templates/service.yaml": "5654e03d922e8ec49649b4bbda9dfc9e643b3b7c9c18b602cc7e26fd36a39c2a", }, @@ -140,7 +140,7 @@ func TestGenerateKubernetesArtifacts(t *testing.T) { }, //sha256 hash of the evaluated templates in each chart expectedHashMap: map[string]string{ - "testchart1/templates/service.yaml": "4c5aa5d38b763fe4730fc31a759c40566a99a9c51f5e0fc7f93473c9affc2ca8", + "testchart2/templates/service.yaml": "2bb96e791ecb6a3404bc5de3f6c4182aed881630269e2aa6766df38b0f852724", "subcharta/templates/service.yaml": "570389588fffdb7193ab265888d781f3d751f3a40362533344f9aa7bb93a8bb0", "subchartb/templates/service.yaml": "5654e03d922e8ec49649b4bbda9dfc9e643b3b7c9c18b602cc7e26fd36a39c2a", }, -- cgit 1.2.3-korg