Commit f4e466f5 authored by Chelsea Holland Komlo's avatar Chelsea Holland Komlo
Browse files

exclude integration tests from main build

parent aa410d05
Showing with 12 additions and 1 deletion
+12 -1
CURRENT_DIRECTORY=`pwd`
docker run --privileged -v $CURRENT_DIRECTORY:/gopkg/src/github.com/hashicorp/nomad -it nomad-e2e /bin/bash -c "cd gopkg/src/github.com/hashicorp/nomad/e2e/migrations && go test"
docker run --privileged -v \
$CURRENT_DIRECTORY:/gopkg/src/github.com/hashicorp/nomad \
-it nomad-e2e /bin/bash \
-c "cd gopkg/src/github.com/hashicorp/nomad/e2e/migrations && go test -integration"
......@@ -2,6 +2,7 @@ package e2e
import (
"bytes"
"flag"
"io/ioutil"
"os"
"os/exec"
......@@ -12,6 +13,8 @@ import (
"github.com/stretchr/testify/assert"
)
var integration = flag.Bool("integration", false, "run integration tests")
const sleepJobOne = `job "sleep" {
type = "batch"
datacenters = ["dc1"]
......@@ -139,6 +142,11 @@ func startCluster(clusterConfig []string) (func(), error) {
}
func TestJobMigrations(t *testing.T) {
flag.Parse()
if !*integration {
t.Skip("skipping test in non-integration mode.")
}
t.Parallel()
assert := assert.New(t)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment