Update testTui setup function to ensure that entries are also added in the remote server and not just locally, to ensure they show up post-sync

This commit is contained in:
David Dworken 2023-09-04 18:13:22 -07:00
parent 434acd3738
commit 7b02d6f2a2
No known key found for this signature in database

View File

@ -1741,8 +1741,12 @@ func setupTestTui(t testing.TB) (shellTester, string, *gorm.DB) {
// Insert a couple hishtory entries
db := hctx.GetDb(hctx.MakeContext())
testutils.Check(t, db.Create(testutils.MakeFakeHistoryEntry("ls ~/")).Error)
testutils.Check(t, db.Create(testutils.MakeFakeHistoryEntry("echo 'aaaaaa bbbb'")).Error)
e1 := testutils.MakeFakeHistoryEntry("ls ~/")
testutils.Check(t, db.Create(e1).Error)
manuallySubmitHistoryEntry(t, userSecret, e1)
e2 := testutils.MakeFakeHistoryEntry("echo 'aaaaaa bbbb'")
testutils.Check(t, db.Create(e2).Error)
manuallySubmitHistoryEntry(t, userSecret, e2)
return tester, userSecret, db
}