Tests fixes.

pull/3206/head
eyalbe4 8 years ago
parent e131c9d4db
commit e82f08eaef

@ -80,7 +80,7 @@ func TestRepoAdd(t *testing.T) {
settings.Home = thome
if err := addRepository(testName, ts.URL(), hh, "", "", "", true); err != nil {
if err := addRepository(testName, ts.URL(), "", "", hh, "", "", "", true); err != nil {
t.Error(err)
}
@ -93,11 +93,11 @@ func TestRepoAdd(t *testing.T) {
t.Errorf("%s was not successfully inserted into %s", testName, hh.RepositoryFile())
}
if err := addRepository(testName, ts.URL(), hh, "", "", "", false); err != nil {
if err := addRepository(testName, ts.URL(), "", "", hh, "", "", "", false); err != nil {
t.Errorf("Repository was not updated: %s", err)
}
if err := addRepository(testName, ts.URL(), hh, "", "", "", false); err != nil {
if err := addRepository(testName, ts.URL(), "", "", hh, "", "", "", false); err != nil {
t.Errorf("Duplicate repository name was added")
}
}

@ -51,7 +51,7 @@ func TestRepoRemove(t *testing.T) {
if err := removeRepoLine(b, testName, hh); err == nil {
t.Errorf("Expected error removing %s, but did not get one.", testName)
}
if err := addRepository(testName, ts.URL(), hh, "", "", "", true); err != nil {
if err := addRepository(testName, ts.URL(), "", "", hh, "", "", "", true); err != nil {
t.Error(err)
}

@ -221,7 +221,7 @@ func TestFindChartInRepoURL(t *testing.T) {
}
defer srv.Close()
chartURL, err := FindChartInRepoURL(srv.URL, "nginx", "", "", "", "", getter.All(environment.EnvSettings{}))
chartURL, err := FindChartInRepoURL(srv.URL, "", "", "nginx", "", "", "", "", getter.All(environment.EnvSettings{}))
if err != nil {
t.Errorf("%s", err)
}
@ -229,7 +229,7 @@ func TestFindChartInRepoURL(t *testing.T) {
t.Errorf("%s is not the valid URL", chartURL)
}
chartURL, err = FindChartInRepoURL(srv.URL, "nginx", "0.1.0", "", "", "", getter.All(environment.EnvSettings{}))
chartURL, err = FindChartInRepoURL(srv.URL, "", "", "nginx", "0.1.0", "", "", "", getter.All(environment.EnvSettings{}))
if err != nil {
t.Errorf("%s", err)
}
@ -239,7 +239,7 @@ func TestFindChartInRepoURL(t *testing.T) {
}
func TestErrorFindChartInRepoURL(t *testing.T) {
_, err := FindChartInRepoURL("http://someserver/something", "nginx", "", "", "", "", getter.All(environment.EnvSettings{}))
_, err := FindChartInRepoURL("http://someserver/something", "", "", "nginx", "", "", "", "", getter.All(environment.EnvSettings{}))
if err == nil {
t.Errorf("Expected error for bad chart URL, but did not get any errors")
}
@ -253,7 +253,7 @@ func TestErrorFindChartInRepoURL(t *testing.T) {
}
defer srv.Close()
_, err = FindChartInRepoURL(srv.URL, "nginx1", "", "", "", "", getter.All(environment.EnvSettings{}))
_, err = FindChartInRepoURL(srv.URL, "", "", "nginx1", "", "", "", "", getter.All(environment.EnvSettings{}))
if err == nil {
t.Errorf("Expected error for chart not found, but did not get any errors")
}
@ -261,7 +261,7 @@ func TestErrorFindChartInRepoURL(t *testing.T) {
t.Errorf("Expected error for chart not found, but got a different error (%v)", err)
}
_, err = FindChartInRepoURL(srv.URL, "nginx1", "0.1.0", "", "", "", getter.All(environment.EnvSettings{}))
_, err = FindChartInRepoURL(srv.URL, "", "", "nginx1", "0.1.0", "", "", "", getter.All(environment.EnvSettings{}))
if err == nil {
t.Errorf("Expected error for chart not found, but did not get any errors")
}
@ -269,7 +269,7 @@ func TestErrorFindChartInRepoURL(t *testing.T) {
t.Errorf("Expected error for chart not found, but got a different error (%v)", err)
}
_, err = FindChartInRepoURL(srv.URL, "chartWithNoURL", "", "", "", "", getter.All(environment.EnvSettings{}))
_, err = FindChartInRepoURL(srv.URL, "", "", "chartWithNoURL", "", "", "", "", getter.All(environment.EnvSettings{}))
if err == nil {
t.Errorf("Expected error for no chart URLs available, but did not get any errors")
}

Loading…
Cancel
Save