From 7b02d6f2a21ca1d81b97c17da7d0e6d11cccd369 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Mon, 4 Sep 2023 18:13:22 -0700 Subject: [PATCH] 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 --- client/client_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 656b40b..16c44e8 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -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 }