mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
Add exact version test. See also #7563
Signed-off-by: Igor Manushin <igor.manushin@gmail.com>
This commit is contained in:
parent
269dd247d0
commit
203f31d57b
1 changed files with 7 additions and 0 deletions
|
|
@ -76,6 +76,8 @@ func TestIndexFile(t *testing.T) {
|
|||
{&chart.Metadata{APIVersion: "v2", Name: "cutter", Version: "0.2.0"}, "cutter-0.2.0.tgz", "http://example.com/charts", "sha256:1234567890abc"},
|
||||
{&chart.Metadata{APIVersion: "v2", Name: "setter", Version: "0.1.9+alpha"}, "setter-0.1.9+alpha.tgz", "http://example.com/charts", "sha256:1234567890abc"},
|
||||
{&chart.Metadata{APIVersion: "v2", Name: "setter", Version: "0.1.9+beta"}, "setter-0.1.9+beta.tgz", "http://example.com/charts", "sha256:1234567890abc"},
|
||||
{&chart.Metadata{APIVersion: "v2", Name: "setter", Version: "0.1.8"}, "setter-0.1.8.tgz", "http://example.com/charts", "sha256:1234567890abc"},
|
||||
{&chart.Metadata{APIVersion: "v2", Name: "setter", Version: "0.1.8+beta"}, "setter-0.1.8+beta.tgz", "http://example.com/charts", "sha256:1234567890abc"},
|
||||
} {
|
||||
if err := i.MustAdd(x.md, x.filename, x.baseURL, x.digest); err != nil {
|
||||
t.Errorf("unexpected error adding to index: %s", err)
|
||||
|
|
@ -114,6 +116,11 @@ func TestIndexFile(t *testing.T) {
|
|||
if err != nil || cv.Metadata.Version != "0.1.9+alpha" {
|
||||
t.Errorf("Expected version: 0.1.9+alpha")
|
||||
}
|
||||
|
||||
cv, err = i.Get("setter", "0.1.8")
|
||||
if err != nil || cv.Metadata.Version != "0.1.8" {
|
||||
t.Errorf("Expected version: 0.1.8")
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadIndex(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue