|
|
@ -98,7 +98,8 @@ func TestIgnore(t *testing.T) {
|
|
|
|
{`cargo/*.*`, "cargo/a.txt", true},
|
|
|
|
{`cargo/*.*`, "cargo/a.txt", true},
|
|
|
|
{`cargo/*.txt`, "mast/a.txt", false},
|
|
|
|
{`cargo/*.txt`, "mast/a.txt", false},
|
|
|
|
{`ru[c-e]?er.txt`, "rudder.txt", true},
|
|
|
|
{`ru[c-e]?er.txt`, "rudder.txt", true},
|
|
|
|
{`templates/.?*`, "templates/.dotfile", true},
|
|
|
|
// ".?*" should not get ignored. https://github.com/kubernetes/helm/issues/4058
|
|
|
|
|
|
|
|
{`templates/.?*`, "templates/.dotfile", false},
|
|
|
|
// "." should never get ignored. https://github.com/kubernetes/helm/issues/1776
|
|
|
|
// "." should never get ignored. https://github.com/kubernetes/helm/issues/1776
|
|
|
|
{`.*`, ".", false},
|
|
|
|
{`.*`, ".", false},
|
|
|
|
{`.*`, "./", false},
|
|
|
|
{`.*`, "./", false},
|
|
|
@ -144,8 +145,8 @@ func TestAddDefaults(t *testing.T) {
|
|
|
|
r := Rules{}
|
|
|
|
r := Rules{}
|
|
|
|
r.AddDefaults()
|
|
|
|
r.AddDefaults()
|
|
|
|
|
|
|
|
|
|
|
|
if len(r.patterns) != 1 {
|
|
|
|
if len(r.patterns) != 0 {
|
|
|
|
t.Errorf("Expected 1 default patterns, got %d", len(r.patterns))
|
|
|
|
t.Errorf("Expected 0 default patterns, got %d", len(r.patterns))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|