Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: update framework to allow deploying Nomad #6969

Merged
merged 2 commits into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions e2e/e2e.go

This file was deleted.

11 changes: 10 additions & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
// This package exists to wrap our e2e provisioning and test framework so that it
// can be run via 'go test ./e2e'. See './framework/framework.go'
package e2e

import (
"os"
"testing"

"github.com/hashicorp/nomad/e2e/framework"

_ "github.com/hashicorp/nomad/e2e/affinities"
_ "github.com/hashicorp/nomad/e2e/clientstate"
_ "github.com/hashicorp/nomad/e2e/connect"
Expand All @@ -19,5 +24,9 @@ import (
)

func TestE2E(t *testing.T) {
RunE2ETests(t)
if os.Getenv("NOMAD_E2E") == "" {
t.Skip("Skipping e2e tests, NOMAD_E2E not set")
} else {
framework.Run(t)
}
}
5 changes: 3 additions & 2 deletions e2e/framework/case.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

capi "github.com/hashicorp/consul/api"
"github.com/hashicorp/nomad/api"
"github.com/hashicorp/nomad/e2e/framework/provisioning"
)

// TestSuite defines a set of test cases and under what conditions to run them
Expand Down Expand Up @@ -58,7 +59,7 @@ func (c Constraints) matches(env Environment) error {

// TC is the base test case which should be embedded in TestCase implementations.
type TC struct {
cluster *ClusterInfo
cluster *provisioning.ClusterInfo
}

// Nomad returns a configured nomad api client
Expand All @@ -77,6 +78,6 @@ func (tc *TC) Name() string {
return tc.cluster.Name
}

func (tc *TC) setClusterInfo(info *ClusterInfo) {
func (tc *TC) setClusterInfo(info *provisioning.ClusterInfo) {
tc.cluster = info
}
Loading