mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-22 16:24:00 +01:00
Add test for updating that relies on the prod server
This commit is contained in:
parent
dc19fa3a17
commit
9a947b73cf
@ -80,6 +80,7 @@ func TestParam(t *testing.T) {
|
||||
t.Run("testExcludeHiddenCommand/"+tester.ShellName(), func(t *testing.T) { testExcludeHiddenCommand(t, tester) })
|
||||
t.Run("testUpdate/head->release/"+tester.ShellName(), func(t *testing.T) { testUpdateFromHeadToRelease(t, tester) })
|
||||
t.Run("testUpdate/prev->release/"+tester.ShellName(), func(t *testing.T) { testUpdateFromPrevToRelease(t, tester) })
|
||||
t.Run("testUpdate/prev->release/prod/"+tester.ShellName(), func(t *testing.T) { testUpdateFromPrevToReleaseViaProd(t, tester) })
|
||||
t.Run("testUpdate/prev->current/"+tester.ShellName(), func(t *testing.T) { testUpdateFromPrevToCurrent(t, tester) })
|
||||
t.Run("testAdvancedQuery/"+tester.ShellName(), func(t *testing.T) { testAdvancedQuery(t, tester) })
|
||||
t.Run("testIntegration/"+tester.ShellName(), func(t *testing.T) { testIntegration(t, tester, Online) })
|
||||
@ -585,6 +586,12 @@ func testUpdateFromPrevToCurrent(t *testing.T, tester shellTester) {
|
||||
testGenericUpdate(t, tester, installFromPrev, updateToHead)
|
||||
}
|
||||
|
||||
func testUpdateFromPrevToReleaseViaProd(t *testing.T, tester shellTester) {
|
||||
defer testutils.BackupAndRestoreEnv("HISHTORY_SERVER")()
|
||||
os.Setenv("HISHTORY_SERVER", "https://api.hishtory.dev")
|
||||
testGenericUpdate(t, tester, installFromPrev, updateToRelease)
|
||||
}
|
||||
|
||||
// TODO: Can we duplicate testUpdateFromPrevToCurrent to also run with the prod server?
|
||||
|
||||
func testGenericUpdate(t *testing.T, tester shellTester, installInitialVersion func(*testing.T, shellTester) (string, string), installUpdatedVersion func(*testing.T, shellTester) string) {
|
||||
|
Loading…
Reference in New Issue
Block a user