Skip to content

Commit

Permalink
Add missing archs to TestSanitizeName
Browse files Browse the repository at this point in the history
Signed-off-by: Sune Keller <absukl@almbrand.dk>
  • Loading branch information
sirlatrom committed Mar 15, 2021
1 parent 8670d0c commit 1ce724c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/assets/assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ func (m *mockOSResolver) GetArch() []string {
}

func TestSanitizeName(t *testing.T) {
linuxAMDResolver := &mockOSResolver{OS: []string{"linux"}, Arch: []string{"amd64"}}
windowsAMDResolver := &mockOSResolver{OS: []string{"windows"}, Arch: []string{"amd64"}}
linuxAMDResolver := &mockOSResolver{OS: []string{"linux"}, Arch: []string{"amd64", "x86_64", "64"}}
windowsAMDResolver := &mockOSResolver{OS: []string{"windows"}, Arch: []string{"amd64", "x86_64", "64"}}
cases := []struct {
in string
v string
Expand Down Expand Up @@ -90,6 +90,9 @@ func TestFilterAssets(t *testing.T) {
{Name: "bin_0.1.0_Linux_x86_64", URL: "https://github.com/marcosnils/bin/releases/download/v0.0.1/bin_0.1.0_Linux_x86_64"},
{Name: "bin_0.1.0_Darwin_x86_64", URL: "https://github.com/marcosnils/bin/releases/download/v0.0.1/bin_0.1.0_Darwin_x86_64"},
}}, "bin_0.0.1_windows_x86_64.exe", windowsAMDResolver},
{args{"tezos", []*Asset{
{Name: "x86_64-linux-tezos-binaries.tar.gz", URL: "https://gitlab.com/api/v4/projects/3836952/packages/generic/tezos/8.2.0/x86_64-linux-tezos-binaries.tar.gz"},
}}, "x86_64-linux-tezos-binaries.tar.gz", linuxAMDResolver},
}

for _, c := range cases {
Expand Down

0 comments on commit 1ce724c

Please sign in to comment.