diff --git a/e2e/ui/input/proxy.nomad b/e2e/ui/input/proxy.nomad index a9e7c7764..8ad9dd01c 100644 --- a/e2e/ui/input/proxy.nomad +++ b/e2e/ui/input/proxy.nomad @@ -2,6 +2,11 @@ job "nomad-proxy" { datacenters = ["dc1", "dc2"] namespace = "proxy" + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + group "proxy" { network { diff --git a/e2e/workload_id/taskapi_test.go b/e2e/workload_id/taskapi_test.go index d28a104cb..daad675f5 100644 --- a/e2e/workload_id/taskapi_test.go +++ b/e2e/workload_id/taskapi_test.go @@ -4,6 +4,7 @@ import ( "fmt" "io" "net/http" + "strings" "testing" "github.com/hashicorp/nomad/e2e/e2eutil" @@ -87,6 +88,22 @@ func testTaskAPIWindows(t *testing.T) { t.Skip("no Windows clients") } + found := false + for _, nodeID := range winNodes { + node, _, err := nomad.Nodes().Info(nodeID, nil) + must.NoError(t, err) + if name := node.Attributes["os.name"]; strings.Contains(name, "2016") { + t.Logf("Node %s is too old to support unix sockets: %s", nodeID, name) + continue + } + + found = true + break + } + if !found { + t.Skip("no Windows clients with unix socket support") + } + jobID := "api-win-" + uuid.Short() jobIDs := []string{jobID} t.Cleanup(e2eutil.CleanupJobsAndGC(t, &jobIDs))