mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-19 02:28:59 +00:00
Support private Pro archive installs
This commit is contained in:
parent
1f5098f89e
commit
0f747781fb
6 changed files with 62 additions and 10 deletions
|
|
@ -88,6 +88,32 @@ func TestRootInstallScriptArchiveSupportContract(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestRootInstallScriptInfersPrivateProArchiveVersion(t *testing.T) {
|
||||
script := `
|
||||
set -euo pipefail
|
||||
` + extractRootInstallShellFunction(t, "infer_release_from_archive_name") + `
|
||||
infer_release_from_archive_name /tmp/pulse-v6.0.0-rc.5-linux-amd64.tar.gz
|
||||
infer_release_from_archive_name /tmp/pulse-pro-v6.0.0-rc.5-linux-amd64.tar.gz
|
||||
infer_release_from_archive_name /tmp/pulse-pro-v6.0.0-linux-arm64.tar.gz
|
||||
`
|
||||
|
||||
out, err := exec.Command("bash", "-c", script).CombinedOutput()
|
||||
if err != nil {
|
||||
t.Fatalf("bash: %v\n%s", err, out)
|
||||
}
|
||||
|
||||
got := strings.Fields(string(out))
|
||||
want := []string{"v6.0.0-rc.5", "v6.0.0-rc.5", "v6.0.0"}
|
||||
if len(got) != len(want) {
|
||||
t.Fatalf("versions = %#v, want %#v", got, want)
|
||||
}
|
||||
for i := range want {
|
||||
if got[i] != want[i] {
|
||||
t.Fatalf("versions = %#v, want %#v", got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestRootInstallScriptUpdateDiskHeadroomRejectsSharedLowSpaceFilesystem(t *testing.T) {
|
||||
script := `
|
||||
set -euo pipefail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue