fix: update unit test for go 1.14 error string change (#7835)

* fix: update unit test for go 1.14 error string change

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* changed strategy based on conversation with Adam

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
Signed-off-by: Matheus Hunsche <matheus.hunsche@ifood.com.br>
pull/8840/head
Matt Butcher 6 years ago committed by Matheus Hunsche
parent c61a824761
commit 7c2738449b

@ -308,7 +308,7 @@ func TestErrorFindChartInRepoURL(t *testing.T) {
if _, err := FindChartInRepoURL("http://someserver/something", "nginx", "", "", "", "", g); err == nil {
t.Errorf("Expected error for bad chart URL, but did not get any errors")
} else if !strings.Contains(err.Error(), `looks like "http://someserver/something" is not a valid chart repository or cannot be reached: Get http://someserver/something/index.yaml`) {
} else if !strings.Contains(err.Error(), `looks like "http://someserver/something" is not a valid chart repository or cannot be reached`) {
t.Errorf("Expected error for bad chart URL, but got a different error (%v)", err)
}

Loading…
Cancel
Save