test: database closed-db error paths + pure goproxy/generic/helm/repotype gaps
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package helm
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestHelmContentTypeBranches(t *testing.T) {
|
||||
p := &Provider{}
|
||||
for path, want := range map[string]string{
|
||||
"charts/x-1.0.0.tgz": "application/gzip",
|
||||
"x.tar.gz": "application/gzip",
|
||||
"index.yaml": "text/yaml",
|
||||
"x.yml": "text/yaml",
|
||||
"other": "application/octet-stream",
|
||||
} {
|
||||
if got := p.ContentType(path); got != want {
|
||||
t.Errorf("ContentType(%q)=%q want %q", path, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user