formatted

This commit is contained in:
David Dworken 2022-04-06 22:44:10 -07:00
parent 1065fff062
commit c48c4dc83f
4 changed files with 10 additions and 12 deletions

View File

@ -156,4 +156,3 @@ func export() {
fmt.Println(entry) fmt.Println(entry)
} }
} }

View File

@ -2,13 +2,13 @@ package main
import ( import (
"bytes" "bytes"
"fmt"
"io/ioutil" "io/ioutil"
"os/exec"
"os" "os"
"os/exec"
"regexp" "regexp"
"strings" "strings"
"testing" "testing"
"fmt"
"github.com/ddworken/hishtory/shared" "github.com/ddworken/hishtory/shared"
) )
@ -50,7 +50,7 @@ func TestIntegrationWithNewDevice(t *testing.T) {
gvm use go1.17 gvm use go1.17
cd /home/david/code/hishtory/ cd /home/david/code/hishtory/
go build -o /tmp/client client/client.go go build -o /tmp/client client/client.go
/tmp/client install ` + userSecret) /tmp/client install `+userSecret)
match, err := regexp.MatchString(`Setting secret hishtory key to .*`, out) match, err := regexp.MatchString(`Setting secret hishtory key to .*`, out)
shared.Check(t, err) shared.Check(t, err)
if !match { if !match {
@ -131,7 +131,7 @@ func TestIntegrationWithNewDevice(t *testing.T) {
t.Fatalf("output has `echo mynewercommand` the wrong number of times") t.Fatalf("output has `echo mynewercommand` the wrong number of times")
} }
// TODO: Test the live update flow // Manually submit an event that is tied to the second user, and then we'll check if we see it for the third user
} }
func testIntegration(t *testing.T) string { func testIntegration(t *testing.T) string {

View File

@ -20,8 +20,8 @@ import (
"syscall" "syscall"
"time" "time"
"gorm.io/gorm"
"gorm.io/driver/sqlite" "gorm.io/driver/sqlite"
"gorm.io/gorm"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/google/uuid" "github.com/google/uuid"

View File

@ -71,7 +71,6 @@ func TestGetUserSecret(t *testing.T) {
} }
} }
func TestPersist(t *testing.T) { func TestPersist(t *testing.T) {
defer shared.BackupAndRestore(t)() defer shared.BackupAndRestore(t)()
db, err := OpenLocalSqliteDb() db, err := OpenLocalSqliteDb()