Skip to content

Commit

Permalink
Remove unnecessary test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Apr 10, 2021
1 parent 33799e0 commit 6340ebc
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions pkg/assets/assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ func TestFilterAssets(t *testing.T) {
{Name: "usql-0.8.2-linux-amd64.tar.bz2", URL: "https://github.com/xo/usql/releases/download/v0.8.2/usql-0.8.2-linux-amd64.tar.bz2"},
{Name: "usql-0.8.2-windows-amd64.zip", URL: "https://github.com/xo/usql/releases/download/v0.8.2/usql-0.8.2-windows-amd64.zip"},
}}, "usql-0.8.2-windows-amd64.zip", testWindowsAMDResolver},
{args{"cli", []*Asset{
{Name: "dapr", URL: ""},
}}, "dapr", testLinuxAMDResolver},
}

for _, c := range cases {
Expand Down Expand Up @@ -180,27 +183,3 @@ func TestIsSupportedExt(t *testing.T) {
}

}

func TestFilterSingleAsset(t *testing.T) {
type args struct {
repoName string
as []*Asset
}
cases := []struct {
in args
out string
}{
{args{"cli", []*Asset{
{Name: "dapr", URL: ""},
}}, "dapr"},
}

for _, c := range cases {
if n, err := FilterAssets(c.in.repoName, c.in.as); err != nil {
t.Fatalf("Error filtering asset [%v]", err)
} else if n.Name != c.out {
t.Fatalf("Error filtering %+v: %+v does not match %s", c.in, n, c.out)
}
}

}

0 comments on commit 6340ebc

Please sign in to comment.