From df53cfc72622aa5c06eb8022d588490a8191feec Mon Sep 17 00:00:00 2001 From: hc-github-team-nomad-core <82989552+hc-github-team-nomad-core@users.noreply.github.com> Date: Wed, 13 Sep 2023 16:43:48 -0500 Subject: [PATCH] backport of commit 6fca4fa715fcfe5c4a214e90f72c54cda7da6efd (#18491) Co-authored-by: Seth Hoenig --- .github/workflows/test-e2e.yml | 5 +---- e2e/vaultcompat/vaultcompat_test.go | 3 ++- testutil/server.go | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 9b46f2b9f10..b29d3fe6a88 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -49,10 +49,7 @@ jobs: - uses: hashicorp/setup-golang@v1 - run: make deps - name: Vault Compatability - run: | - sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers - sudo -E env "PATH=$PATH" make integration-test - sudo -E env "PATH=$PATH" make clean + run: make integration-test - run: make e2e-test permissions: contents: read diff --git a/e2e/vaultcompat/vaultcompat_test.go b/e2e/vaultcompat/vaultcompat_test.go index ec4d644be1c..d4135709cc2 100644 --- a/e2e/vaultcompat/vaultcompat_test.go +++ b/e2e/vaultcompat/vaultcompat_test.go @@ -133,7 +133,8 @@ func startNomad(t *testing.T, vc *vaultapi.Client) (func(), *nomadapi.Client) { } c.DevMode = true c.Client = &testutil.ClientConfig{ - Enabled: true, + Enabled: true, + TotalCompute: 1000, } c.LogLevel = "off" }) diff --git a/testutil/server.go b/testutil/server.go index 5d90a377b53..418eac3f1a1 100644 --- a/testutil/server.go +++ b/testutil/server.go @@ -75,7 +75,8 @@ type ServerConfig struct { // ClientConfig is used to configure the client type ClientConfig struct { - Enabled bool `json:"enabled"` + Enabled bool `json:"enabled"` + TotalCompute int `json:"cpu_total_compute"` } // VaultConfig is used to configure Vault