mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-09 23:17:55 +02:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user