Skip to content

Commit

Permalink
new: use test model from elemental
Browse files Browse the repository at this point in the history
  • Loading branch information
primalmotion committed Jan 10, 2018
1 parent 787b460 commit d11dbc3
Show file tree
Hide file tree
Showing 30 changed files with 78 additions and 2,212 deletions.
3 changes: 2 additions & 1 deletion bahamut_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"testing"

"github.com/aporeto-inc/elemental"
"github.com/aporeto-inc/elemental/test/model"
. "github.com/smartystreets/goconvey/convey"
)

Expand Down Expand Up @@ -89,7 +90,7 @@ func TestBahamut_NewBahamut(t *testing.T) {
})

Convey("Then pushing an event should not panic", func() {
So(func() { b.Push(elemental.NewEvent(elemental.EventCreate, NewList())) }, ShouldNotPanic)
So(func() { b.Push(elemental.NewEvent(elemental.EventCreate, testmodel.NewList())) }, ShouldNotPanic)
})
})

Expand Down
11 changes: 6 additions & 5 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"testing"

"github.com/aporeto-inc/elemental"
"github.com/aporeto-inc/elemental/test/model"
. "github.com/smartystreets/goconvey/convey"
)

Expand Down Expand Up @@ -64,8 +65,8 @@ func TestContext_Events(t *testing.T) {
Convey("When I enqueue 2 events", func() {

c.EnqueueEvents(
elemental.NewEvent(elemental.EventCreate, NewList()),
elemental.NewEvent(elemental.EventCreate, NewList()))
elemental.NewEvent(elemental.EventCreate, testmodel.NewList()),
elemental.NewEvent(elemental.EventCreate, testmodel.NewList()))

Convey("Then I should have 2 events in the queue", func() {
So(c.HasEvents(), ShouldBeTrue)
Expand All @@ -76,13 +77,13 @@ func TestContext_Events(t *testing.T) {
Convey("When I set the Events", func() {

c.EnqueueEvents(
elemental.NewEvent(elemental.EventCreate, NewList()),
elemental.NewEvent(elemental.EventCreate, NewList()),
elemental.NewEvent(elemental.EventCreate, testmodel.NewList()),
elemental.NewEvent(elemental.EventCreate, testmodel.NewList()),
)

c.SetEvents(
elemental.NewEvents(
elemental.NewEvent(elemental.EventCreate, NewList()),
elemental.NewEvent(elemental.EventCreate, testmodel.NewList()),
),
)

Expand Down
Loading

0 comments on commit d11dbc3

Please sign in to comment.