mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
442 B
20 lines
442 B
9 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestListChartRepositories(t *testing.T) {
|
||
|
c := stubContext()
|
||
|
s := httpHarness(c, "GET /chart_repositories", listChartRepositoriesHandlerFunc)
|
||
|
defer s.Close()
|
||
|
|
||
|
res, err := http.Get(s.URL + "/chart_repositories")
|
||
|
if err != nil {
|
||
|
t.Errorf("Failed GET: %s", err)
|
||
|
} else if res.StatusCode != http.StatusOK {
|
||
|
t.Errorf("Expected status %d, got %d", http.StatusOK, res.StatusCode)
|
||
|
}
|
||
|
}
|