Skip to content

Commit

Permalink
repo: fix repo merge unit test
Browse files Browse the repository at this point in the history
Enable asserts that accidentally excluded from normal test flow.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
  • Loading branch information
marquiz committed Mar 15, 2022
1 parent 974a603 commit 7a08426
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkg/repo/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,15 @@ func TestMerge(t *testing.T) {

if len(ind1.Entries) != 2 {
t.Errorf("Expected 2 entries, got %d", len(ind1.Entries))
vs := ind1.Entries["dreadnought"]
if len(vs) != 2 {
t.Errorf("Expected 2 versions, got %d", len(vs))
}
v := vs[0]
if v.Version != "0.2.0" {
t.Errorf("Expected %q version to be 0.2.0, got %s", v.Name, v.Version)
}
}

vs := ind1.Entries["dreadnought"]
if len(vs) != 2 {
t.Errorf("Expected 2 versions, got %d", len(vs))
}

if v := vs[1]; v.Version != "0.2.0" {
t.Errorf("Expected %q version to be 0.2.0, got %s", v.Name, v.Version)
}

}
Expand Down

0 comments on commit 7a08426

Please sign in to comment.