Skip to content

Commit

Permalink
fix: fixed tests after sending acked events back to the client
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Louvigny committed Nov 27, 2018
1 parent e24ec31 commit 2f73d99
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions core/test/e2e_test.go
Expand Up @@ -285,7 +285,7 @@ func TestWithEnqueuer(t *testing.T) {
So(err, ShouldBeNil)
So(res, ShouldResemble, &node.Void{})

So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 0, 0, 0, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 1, 0, 0, 0, 0})
// FIXME: check that event is acked in db

everythingWentFine()
Expand Down Expand Up @@ -324,7 +324,7 @@ func TestWithEnqueuer(t *testing.T) {

time.Sleep(time.Second * 1)

So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 0, 2, 2, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 1, 2, 2, 0, 0})

everythingWentFine()
})
Expand All @@ -346,7 +346,7 @@ func TestWithEnqueuer(t *testing.T) {
So(err, ShouldBeNil)
So(res, ShouldResemble, &node.Void{})

So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{2, 3, 1, 2, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{2, 4, 1, 2, 0, 0})

everythingWentFine()
})
Expand All @@ -367,7 +367,7 @@ func TestWithEnqueuer(t *testing.T) {
So(event.Direction, ShouldEqual, p2p.Event_Incoming)
_, err = event.GetContactRequestAcceptedAttrs()
So(err, ShouldBeNil)
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{2, 0, 1, 2, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{2, 1, 1, 2, 0, 0})

everythingWentFine()
})
Expand All @@ -390,7 +390,7 @@ func TestWithEnqueuer(t *testing.T) {
So(err, ShouldBeNil)
So(res, ShouldResemble, &node.Void{})

So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{3, 2, 0, 2, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{3, 3, 0, 2, 0, 0})

everythingWentFine()
})
Expand All @@ -411,7 +411,7 @@ func TestWithEnqueuer(t *testing.T) {
So(err, ShouldBeNil)
So(attrs.Me.DisplayName, ShouldEqual, "Bob")
So(attrs.Me.DisplayStatus, ShouldBeEmpty)
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{3, 0, 0, 2, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{3, 1, 0, 2, 0, 0})

everythingWentFine()
})
Expand All @@ -436,7 +436,7 @@ func TestWithEnqueuer(t *testing.T) {
So(err, ShouldBeNil)
So(res, ShouldResemble, &node.Void{})

So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{2, 0, 1, 4, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{2, 1, 1, 4, 0, 0})

everythingWentFine()
})
Expand All @@ -459,7 +459,7 @@ func TestWithEnqueuer(t *testing.T) {
So(err, ShouldBeNil)
So(res, ShouldResemble, &node.Void{})

So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{1, 0, 1, 4, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{1, 1, 1, 5, 0, 0})

everythingWentFine()
})
Expand All @@ -482,7 +482,7 @@ func TestWithEnqueuer(t *testing.T) {
So(err, ShouldBeNil)
So(res, ShouldResemble, &node.Void{})

So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 0, 1, 4, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 1, 1, 6, 0, 0})

everythingWentFine()
})
Expand All @@ -504,7 +504,7 @@ func TestWithEnqueuer(t *testing.T) {
So(err, ShouldBeNil)
So(res, ShouldResemble, &node.Void{})

So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 0, 0, 4, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 2, 0, 6, 0, 0})

everythingWentFine()
})
Expand All @@ -528,7 +528,7 @@ func TestWithEnqueuer(t *testing.T) {
So(attrs.Me.Status, ShouldEqual, entity.Contact_Unknown)
So(attrs.Me.DisplayStatus, ShouldBeEmpty)
So(attrs.Me.Devices, ShouldBeNil)
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 0, 0, 0, 0, 0})
So(nodeChansLens(alice, bob, eve), ShouldResemble, []int{0, 2, 0, 2, 0, 0})

everythingWentFine()
})
Expand Down

0 comments on commit 2f73d99

Please sign in to comment.