Skip to content

Commit

Permalink
added shovel plugin to integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
kbudde committed Apr 24, 2019
1 parent 5da54c9 commit c41ae6b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package main

import log "github.com/sirupsen/logrus"
import (
log "github.com/sirupsen/logrus"
"io/ioutil"
)

func init() {
log.SetLevel(log.FatalLevel)
log.SetOutput(ioutil.Discard)
}
2 changes: 2 additions & 0 deletions testenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM rabbitmq:3.7-management-alpine
RUN rabbitmq-plugins enable --offline rabbitmq_shovel rabbitmq_shovel_management
4 changes: 2 additions & 2 deletions testenv/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ func NewEnvironment(t *testing.T, dockerTag string) TestEnvironment {
tenv.docker.MaxWait = MaxWait

// pulls an image, creates a container based on it and runs it
resource, err := tenv.docker.RunWithOptions(&dockertest.RunOptions{Repository: "rabbitmq", Tag: dockerTag, Hostname: "localtest"})

resource, err := pool.BuildAndRunWithOptions("./testenv/Dockerfile", &dockertest.RunOptions{Name: "rabbitmq-test", Hostname: "localtest"})
if err != nil {
log.Fatalf("Could not start resource: %s", err)
}
resource.Expire(120)
tenv.resource = resource

checkManagementWebsite := func() error {
Expand Down

0 comments on commit c41ae6b

Please sign in to comment.