Skip to content

Commit

Permalink
feat: add keploy to arkade
Browse files Browse the repository at this point in the history
Signed-off-by: Animesh Pathak <[email protected]>
  • Loading branch information
Sonichigo authored and alexellis committed Sep 2, 2024
1 parent 34ca06f commit 1020843
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,8 @@ There are 52 apps that you can install on your cluster.
| [k3s](https://github.com/k3s-io/k3s) | Lightweight Kubernetes |
| [k3sup](https://github.com/alexellis/k3sup) | Bootstrap Kubernetes with k3s over SSH < 1 min. |
| [k9s](https://github.com/derailed/k9s) | Provides a terminal UI to interact with your Kubernetes clusters. |
| [kail](https://github.com/boz/kail) | Kubernetes log viewer. |
| [kail](https://github.com/boz/kail) | Kubernetes log viewer.
| [keploy](https://github.com/keploy/keploy) | Generate tests and stubs for your application that actually work! |
| [kgctl](https://github.com/squat/kilo) | A CLI to manage Kilo, a multi-cloud network overlay built on WireGuard and designed for Kubernetes. |
| [kim](https://github.com/rancher/kim) | Build container images inside of Kubernetes. (Experimental) |
| [kind](https://github.com/kubernetes-sigs/kind) | Run local Kubernetes clusters using Docker container nodes. |
Expand Down
65 changes: 65 additions & 0 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7650,3 +7650,68 @@ func Test_DownloadLazyDocker(t *testing.T) {
}

}

func Test_DownloadKeploy(t *testing.T) {
tools := MakeTools()
name := "keploy"

tool := getTool(name, tools)

const toolVersion = "v2.3.0"

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",
},
{
os: "linux",
arch: archARM64,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_linux_arm64.tar.gz",
},
{
os: "darwin",
arch: archDarwinARM64,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_darwin_all.tar.gz",
},
{
os: "ming",
arch: archARM64,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_windows_amd64.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",
},
{
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,
version: toolVersion,
url: "https://github.com/keploy/keploy/releases/download/v2.3.0-beta15/keploy_Windows_armv7.tar.gz",
},
}

for _, tc := range tests {
got, err := tool.GetURL(tc.os, tc.arch, tc.version, false)
if err != nil {
t.Fatal(err)
}
if got != tc.url {
t.Errorf("\nwant: %s, \n got: %s", tc.url, got)
}
}

}
31 changes: 31 additions & 0 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4202,5 +4202,36 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}
{{.Name}}_{{.VersionNumber}}_{{$osStr}}_{{$arch}}.{{$ext}}`,
})

tools = append(tools,
Tool{
Owner: "keploy",
Repo: "keploy",
Name: "keploy",
Description: "Test generation for Developers. Generate tests and stubs for your application that actually work!",
BinaryTemplate: `
{{ $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"}}
{{- else if eq .OS "linux" -}}
{{ $os = "linux" }}
{{- end -}}
keploy_{{$os}}.{{$ext}}
`,
})

return tools
}

0 comments on commit 1020843

Please sign in to comment.