Skip to content

Commit

Permalink
Fix faulty tests merged via #1104 for keploy
Browse files Browse the repository at this point in the history
Faulty tests and templates were commited via #1104 from
@Sonichigo's PR.

This commit fixes the tests and templates for keploy

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Sep 2, 2024
1 parent 1020843 commit 2c0eb21
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
39 changes: 23 additions & 16 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7658,49 +7658,56 @@ func Test_DownloadKeploy(t *testing.T) {
tool := getTool(name, tools)

const toolVersion = "v2.3.0"
// keploy_darwin_all.tar.gz
// 20.4 MB
// 1 hour ago
// keploy_linux_amd64.tar.gz
// 12.4 MB
// 1 hour ago
// keploy_linux_arm64.tar.gz
// 11.4 MB
// 1 hour ago
// keploy_windows_amd64.tar.gz
// 10.4 MB
// 1 hour ago
// keploy_windows_arm64.tar.gz

tests := []test{
{
os: "linux",
arch: arch64bit,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_linux_amd64.tar.gz",
url: "https://github.com/keploy/keploy/releases/download/v2.3.0/keploy_linux_amd64.tar.gz",
},
{
os: "linux",
arch: archARM64,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_linux_arm64.tar.gz",
url: "https://github.com/keploy/keploy/releases/download/v2.3.0/keploy_linux_arm64.tar.gz",
},
{
os: "darwin",
arch: archDarwinARM64,
arch: arch64bit,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_darwin_all.tar.gz",
url: "https://github.com/keploy/keploy/releases/download/v2.3.0/keploy_darwin_all.tar.gz",
},
{
os: "ming",
arch: archARM64,
os: "darwin",
arch: archDarwinARM64,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_windows_amd64.tar.gz",
url: "https://github.com/keploy/keploy/releases/download/v2.3.0/keploy_darwin_all.tar.gz",
},
{
os: "ming",
arch: arch64bit,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_Windows_x86_64.tar.gz",
url: "https://github.com/keploy/keploy/releases/download/v2.3.0/keploy_windows_amd64.zip",
},
{
os: "ming",
arch: "armv6l",
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_Windows_armv6.tar.gz",
},
{
os: "ming",
arch: archARM7,
arch: archARM64,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_Windows_armv7.tar.gz",
url: "https://github.com/keploy/keploy/releases/download/v2.3.0/keploy_windows_arm64.zip",
},
}

Expand Down
8 changes: 5 additions & 3 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4213,25 +4213,27 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}
{{ $os := .OS }}
{{ $arch := .Arch }}
{{ $ext := "tar.gz" }}
{{- if eq .Arch "aarch64" -}}
{{$arch = "arm64"}}
{{- else if eq .Arch "arm64" -}}
{{ $arch = "arm64" }}
{{- else if eq .Arch "x86_64" -}}
{{ $arch = "amd64" }}
{{- end -}}
{{ if HasPrefix .OS "ming" -}}
{{$os = "windows"}}
{{$ext = "zip"}}
{{- end -}}
{{- if eq .OS "darwin" -}}
{{$os = "darwin_all"}}
{{$os = "darwin"}}
{{$arch = "all"}}
{{- else if eq .OS "linux" -}}
{{ $os = "linux" }}
{{- end -}}
keploy_{{$os}}.{{$ext}}
keploy_{{$os}}_{{$arch}}.{{$ext}}
`,
})

return tools
}

0 comments on commit 2c0eb21

Please sign in to comment.