Build JMS tests from Makefile

This commit is contained in:
Arthur Barr
2018-03-21 10:12:36 +00:00
parent 94a4eac2ca
commit 54885597fa
4 changed files with 22 additions and 3 deletions

View File

@@ -29,6 +29,8 @@ import (
"github.com/docker/go-connections/nat"
)
// TestDevGoldenPath tests using the default values for the default developer config.
// Note: This test requires a separate container image to be available for the JMS tests.
func TestDevGoldenPath(t *testing.T) {
t.Parallel()
cli, err := client.NewEnvClient()
@@ -64,6 +66,8 @@ func TestDevGoldenPath(t *testing.T) {
stopContainer(t, cli, id)
}
// TestDevTLS tests the default developer config using the a custom TLS key store.
// Note: This test requires a separate container image to be available for the JMS tests
func TestDevTLS(t *testing.T) {
t.Parallel()
cli, err := client.NewEnvClient()

View File

@@ -73,7 +73,7 @@ func runJMSTests(t *testing.T, cli *client.Client, ID string, tls bool) {
"MQ_PASSWORD=" + devAppPassword,
"MQ_CHANNEL=DEV.APP.SVRCONN",
},
Image: "msgtest",
Image: imageNameDevJMS(),
}
if tls {
t.Log("Using TLS from JMS client")

View File

@@ -49,6 +49,14 @@ func imageName() string {
return image
}
func imageNameDevJMS() string {
image, ok := os.LookupEnv("DEV_JMS_IMAGE")
if !ok {
image = "mq-dev-jms-test"
}
return image
}
func coverage() bool {
cover := os.Getenv("TEST_COVER")
if cover == "true" || cover == "1" {