mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
exclude integration tests from main build
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user