|
|
@ -118,33 +118,6 @@ func TestCreateFrom(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func TestValidateChartName(t *testing.T) {
|
|
|
|
|
|
|
|
for name, shouldPass := range map[string]bool{
|
|
|
|
|
|
|
|
"": false,
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_.": true,
|
|
|
|
|
|
|
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ-_.": true,
|
|
|
|
|
|
|
|
"$hello": false,
|
|
|
|
|
|
|
|
"Hellô": false,
|
|
|
|
|
|
|
|
"he%%o": false,
|
|
|
|
|
|
|
|
"he\nllo": false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"abcdefghijklmnopqrstuvwxyz-_." +
|
|
|
|
|
|
|
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ-_.": false,
|
|
|
|
|
|
|
|
} {
|
|
|
|
|
|
|
|
if err := validateChartName(name); (err != nil) == shouldPass {
|
|
|
|
|
|
|
|
t.Errorf("test for %q failed", name)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TestCreate_Overwrite is a regression test for making sure that files are overwritten.
|
|
|
|
// TestCreate_Overwrite is a regression test for making sure that files are overwritten.
|
|
|
|
func TestCreate_Overwrite(t *testing.T) {
|
|
|
|
func TestCreate_Overwrite(t *testing.T) {
|
|
|
|
tdir, err := ioutil.TempDir("", "helm-")
|
|
|
|
tdir, err := ioutil.TempDir("", "helm-")
|
|
|
|