@@ -50,6 +50,15 @@ func TestParseReq(t *testing.T) {
|
50 | 50 | input: "https://helm.releases.hashicorp.com/vault@0.19.0", |
51 | 51 | err: errors.New("not of form 'repo/chart@version(:path)' where repo contains no special characters"), |
52 | 52 | }, |
| 53 | + { |
| 54 | +name: "repo-with-special-chars", |
| 55 | +input: "with-dashes/package@1.0.0", |
| 56 | +expected: &Requirement{ |
| 57 | +Chart: "with-dashes/package", |
| 58 | +Version: "1.0.0", |
| 59 | +Directory: "", |
| 60 | + }, |
| 61 | + }, |
53 | 62 | } |
54 | 63 | |
55 | 64 | for _, tc := range testCases { |
@@ -68,12 +77,13 @@ func TestAddRepos(t *testing.T) {
|
68 | 77 | err = c.AddRepos( |
69 | 78 | Repo{Name: "foo", URL: "https://foo.com"}, |
70 | 79 | Repo{Name: "foo2", URL: "https://foo2.com"}, |
| 80 | +Repo{Name: "with-dashes", URL: "https://foo.com"}, |
71 | 81 | ) |
72 | 82 | assert.NoError(t, err) |
73 | 83 | |
74 | | -// Only \w characters are allowed in repo names |
| 84 | +// Only \w- characters are allowed in repo names |
75 | 85 | err = c.AddRepos( |
76 | | -Repo{Name: "with-dashes", URL: "https://foo.com"}, |
| 86 | +Repo{Name: "re:po", URL: "https://foo.com"}, |
77 | 87 | ) |
78 | 88 | assert.EqualError(t, err, "1 Repo(s) were skipped. Please check above logs for details") |
79 | 89 | |
|