diff --git a/.github/workflows/test-core.yaml b/.github/workflows/test-core.yaml index 553efdf47..0e5a45a61 100644 --- a/.github/workflows/test-core.yaml +++ b/.github/workflows/test-core.yaml @@ -30,7 +30,7 @@ env: NOMAD_TEST_LOG_LEVEL: OFF jobs: checks: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 10 steps: - uses: actions/checkout@v2 @@ -49,7 +49,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-11, windows-2019] + os: [ubuntu-22.04, macos-11, windows-2019] runs-on: ${{matrix.os}} timeout-minutes: 20 steps: @@ -65,7 +65,7 @@ jobs: make bootstrap make dev tests-api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 30 steps: - uses: actions/checkout@v2 @@ -82,7 +82,7 @@ jobs: sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers sudo -E env "PATH=$PATH" make test-nomad-module tests-pkgs: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 30 strategy: fail-fast: false diff --git a/command/integration_test.go b/command/integration_test.go index 01eb866b2..f3c6b476e 100644 --- a/command/integration_test.go +++ b/command/integration_test.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/ci" + "github.com/hashicorp/nomad/client/testutil" "github.com/stretchr/testify/assert" ) @@ -37,6 +38,8 @@ func TestIntegration_Command_NomadInit(t *testing.T) { func TestIntegration_Command_RoundTripJob(t *testing.T) { ci.Parallel(t) + testutil.DockerCompatible(t) + assert := assert.New(t) tmpDir := t.TempDir() diff --git a/nomad/structs/config/consul_test.go b/nomad/structs/config/consul_test.go index e66bae2cf..62f2fcd86 100644 --- a/nomad/structs/config/consul_test.go +++ b/nomad/structs/config/consul_test.go @@ -5,7 +5,6 @@ import ( "fmt" "os" "os/exec" - "strings" "testing" "time" @@ -176,9 +175,8 @@ func TestConsulConfig_Exec(t *testing.T) { func TestConsulConfig_IpTemplateParse(t *testing.T) { ci.Parallel(t) - privateIps, err := sockaddr.GetPrivateIP() + privateIp, err := sockaddr.GetPrivateIP() require.NoError(t, err) - privateIp := strings.Split(privateIps, " ")[0] testCases := []struct { name string @@ -188,7 +186,7 @@ func TestConsulConfig_IpTemplateParse(t *testing.T) { }{ {name: "string address keeps working", tmpl: "10.0.1.0:8500", expectedOut: "10.0.1.0:8500", expectErr: false}, {name: "single ip sock-addr template", tmpl: "{{ GetPrivateIP }}:8500", expectedOut: privateIp + ":8500", expectErr: false}, - {name: "multi ip sock-addr template", tmpl: "{{ GetPrivateIPs }}:8500", expectedOut: "", expectErr: true}, + {name: "multi ip sock-addr template", tmpl: "10.0.1.0 10.0.1.1:8500", expectedOut: "", expectErr: true}, } for _, tc := range testCases {