Skip to content

Commit

Permalink
Merge pull request #315 from KyleMaas/fix-teststartup
Browse files Browse the repository at this point in the history
Fix TestStartup
  • Loading branch information
decentral1se authored Jan 29, 2023
2 parents b259c2a + 492a68f commit 8193f14
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/local_fork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@ import (
refs "github.com/ssbc/go-ssb-refs"
"github.com/ssbc/go-ssb/internal/mutil"
"github.com/ssbc/go-ssb/internal/storedrefs"
"github.com/ssbc/go-ssb/internal/testutils"
"github.com/ssbc/go-ssb/sbot"
"github.com/ssbc/margaret"
"github.com/stretchr/testify/assert"
)

func TestStartup(t *testing.T) {
if testutils.SkipOnCI(t) {
// https://github.com/ssbc/go-ssb/issues/237
return
}

a := assert.New(t)
var err error
session := newSession(t, nil, nil)
Expand Down Expand Up @@ -52,14 +46,17 @@ func TestStartup(t *testing.T) {
botlog, err = getFeed(bot, feedID)
a.NoError(err)
a.NotNil(botlog)
bot.WaitUntilIndexesAreSynced()
a.EqualValues(1, botlog.Seq(), "maggie seqno of log with 2 messages should be 1")
// post another message
_, err = bot.PublishLog.Append(refs.Post{Type: "post", Text: "3 hello world!"})
a.NoError(err)
bot.WaitUntilIndexesAreSynced()
a.EqualValues(2, botlog.Seq(), "maggie seqno of log with 3 messages should be 2")
// post another message
_, err = bot.PublishLog.Append(refs.Post{Type: "post", Text: "4 hello world!"})
a.NoError(err)
bot.WaitUntilIndexesAreSynced()
a.EqualValues(3, botlog.Seq(), "maggie seqno of log with 4 messages should be 3")
bot.Shutdown()
}
Expand Down

0 comments on commit 8193f14

Please sign in to comment.