assert.Equal(t,"this feature has been marked as experimental and is not enabled by default. Please set HELM_EXPERIMENTAL_FEATURE=1 in your environment to use this feature",g.Error().Error())
assert.EqualError(t,g.Error(),"this feature has been marked as experimental and is not enabled by default. Please set HELM_EXPERIMENTAL_FEATURE=1 in your environment to use this feature")
// versions of Darwin do not. As there are people developing Helm using both old and new versions of Darwin we test
// for both messages.
ifruntime.GOOS=="darwin"{
if!strings.Contains(err.Error(),"x509: “Acme Co” certificate is not trusted")&&!strings.Contains(err.Error(),"x509: certificate signed by unknown authority"){
t.Errorf("Expected TLS error for function FindChartInAuthAndTLSAndPassRepoURL not found, but got a different error (%v)",err)
}
assert.True(t,strings.Contains(err.Error(),"x509: “Acme Co” certificate is not trusted")||strings.Contains(err.Error(),"x509: certificate signed by unknown authority"),"Expected TLS error for function FindChartInAuthAndTLSAndPassRepoURL not found, but got a different error (%v)",err)
}else{
assert.ErrorContainsf(t,err,"x509: certificate signed by unknown authority","Expected TLS error for function FindChartInAuthAndTLSAndPassRepoURL not found, but got a different error")
require.Error(t,err,"Expected error for bad chart URL, but did not get any errors")
require.ErrorContainsf(t,err,`looks like "http://someserver/something" is not a valid chart repository or cannot be reached`,"Expected error for bad chart URL, but got a different error")
require.Error(t,err,"Expected error for chart not found, but did not get any errors")
require.EqualError(t,err,`chart "nginx1" version "0.1.0" not found in `+srv.URL+` repository`,"Expected error for chart not found, but got a different error")