tests are passing and getting close now. Need to test the live update flow along with more thorough testing for everything

This commit is contained in:
David Dworken
2022-04-05 23:31:24 -07:00
parent 843bcb32b3
commit 71fc809f9a
7 changed files with 242 additions and 19 deletions

View File

@ -12,6 +12,7 @@ import (
func TestSetup(t *testing.T) {
defer shared.BackupAndRestore(t)()
defer shared.RunTestServer(t)()
homedir, err := os.UserHomeDir()
shared.Check(t, err)
if _, err := os.Stat(path.Join(homedir, shared.HISHTORY_PATH, shared.CONFIG_PATH)); err == nil {
@ -30,6 +31,7 @@ func TestSetup(t *testing.T) {
func TestBuildHistoryEntry(t *testing.T) {
defer shared.BackupAndRestore(t)()
defer shared.RunTestServer(t)()
shared.Check(t, Setup([]string{}))
entry, err := BuildHistoryEntry([]string{"unused", "saveHistoryEntry", "120", " 123 ls / ", "1641774958326745663"})
shared.Check(t, err)
@ -52,6 +54,7 @@ func TestBuildHistoryEntry(t *testing.T) {
func TestGetUserSecret(t *testing.T) {
defer shared.BackupAndRestore(t)()
defer shared.RunTestServer(t)()
shared.Check(t, Setup([]string{}))
secret1, err := GetUserSecret()
shared.Check(t, err)