Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Feb 24, 2023
1 parent ad62a4f commit 2853ab4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/object_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,24 @@ func TestObjectSync(t *testing.T) {
t.Skip()
})

t.Run("Sla History Trail", func(t *testing.T) {
t.Parallel()

require.Eventuallyf(t, func() bool {
var count int
err := db.Get(&count, db.Rebind("SELECT COUNT(*) FROM sla_history_trail WHERE service_id IS NULL"))
require.NoError(t, err, "querying hosts sla history trail should not fail")
return count == len(data.Hosts)
}, 20*time.Second, 200*time.Millisecond, "Newly created hosts should exists in database: EXPECTED: %d", len(data.Hosts))

require.Eventuallyf(t, func() bool {
var count int
err := db.Get(&count, db.Rebind("SELECT COUNT(*) FROM sla_history_trail WHERE service_id IS NOT NULL"))
require.NoError(t, err, "querying services sla history trail should not fail")
return count == len(data.Services)
}, 20*time.Second, 200*time.Millisecond, "Newly created services should exists in database: EXPECTED: %d", len(data.Services))
})

t.Run("RuntimeUpdates", func(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit 2853ab4

Please sign in to comment.