Windows fixes for e2e tests (#16592)
* e2e: skip task api test when windows too old * e2e: don't run proxy on windows
This commit is contained in:
parent
b3d2ec7634
commit
15fe2ade18
|
@ -2,6 +2,11 @@ job "nomad-proxy" {
|
|||
datacenters = ["dc1", "dc2"]
|
||||
namespace = "proxy"
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.kernel.name}"
|
||||
value = "linux"
|
||||
}
|
||||
|
||||
group "proxy" {
|
||||
|
||||
network {
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue