Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
76 changes: 38 additions & 38 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@ name: test-windows
on:
pull_request:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.changelog/**'
- '.tours/**'
- 'contributing/**'
- 'demo/**'
- 'dev/**'
- 'e2e/**'
- 'integrations/**'
- 'pkg/**'
- 'scripts/**'
- 'terraform/**'
- 'ui/**'
- 'website/**'
- "README.md"
- "CHANGELOG.md"
- ".changelog/**"
- ".tours/**"
- "contributing/**"
- "demo/**"
- "dev/**"
- "e2e/**"
- "integrations/**"
- "pkg/**"
- "scripts/**"
- "terraform/**"
- "ui/**"
- "website/**"
push:
branches:
- main
- release/**
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.changelog/**'
- '.tours/**'
- 'contributing/**'
- 'demo/**'
- 'dev/**'
- 'e2e/**'
- 'integrations/**'
- 'pkg/**'
- 'scripts/**'
- 'terraform/**'
- 'ui/**'
- 'website/**'
- "README.md"
- "CHANGELOG.md"
- ".changelog/**"
- ".tours/**"
- "contributing/**"
- "demo/**"
- "dev/**"
- "e2e/**"
- "integrations/**"
- "pkg/**"
- "scripts/**"
- "terraform/**"
- "ui/**"
- "website/**"

env:
VAULT_VERSION: 1.4.1
jobs:
test-windows:
runs-on: 'windows-2022-16core'
runs-on: "windows-2022-16core"
env:
GOTESTSUM_PATH: c:\tmp\test-reports
steps:
Expand Down Expand Up @@ -83,15 +83,15 @@ jobs:
export PATH=/c/go/bin:/c/gopath/bin:$PATH
gotestsum --format=short-verbose \
--junitfile results.xml \
github.com/hashicorp/nomad/drivers/docker \
github.com/hashicorp/nomad/drivers/rawexec \
github.com/hashicorp/nomad/drivers/shared/executor \
github.com/hashicorp/nomad/client/lib/fifo \
github.com/hashicorp/nomad/client/logmon \
github.com/hashicorp/nomad/client/allocrunner/taskrunner/template \
github.com/hashicorp/nomad/client/allocrunner/taskrunner/getter \
github.com/hashicorp/nomad/client/allocdir \
github.com/hashicorp/nomad/plugins/base
github.com/hashicorp/nomad/v2/drivers/docker \
github.com/hashicorp/nomad/v2/drivers/rawexec \
github.com/hashicorp/nomad/v2/drivers/shared/executor \
github.com/hashicorp/nomad/v2/client/lib/fifo \
github.com/hashicorp/nomad/v2/client/logmon \
github.com/hashicorp/nomad/v2/client/allocrunner/taskrunner/template \
github.com/hashicorp/nomad/v2/client/allocrunner/taskrunner/getter \
github.com/hashicorp/nomad/v2/client/allocdir \
github.com/hashicorp/nomad/v2/plugins/base
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: results.xml
Expand Down
10 changes: 5 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ check: ## Lint the source code
@cd ./jobspec2 && \
if go list --test -f '{{ join .Deps "\n" }}' . | \
grep github.com/hashicorp/nomad/ | \
grep -v -e /nomad/jobspec2/ -e nomad/jobspec2.test | \
grep -v -e /nomad/v2/jobspec2/ -e nomad/v2/jobspec2.test | \
grep -v -e /nomad/api ; then echo \
" /jobspec2 package depends the ^^ above internal nomad packages. Remove such dependency"; exit 1; fi

Expand Down Expand Up @@ -341,7 +341,7 @@ e2e-test: dev ## Run the Nomad e2e test suite
$(if $(ENABLE_RACE),-race) $(if $(VERBOSE),-v) \
-timeout=900s \
-tags "$(GO_TAGS)" \
github.com/hashicorp/nomad/e2e
github.com/hashicorp/nomad/v2/e2e

.PHONY: integration-test
integration-test: dev ## Run Nomad integration tests
Expand All @@ -352,7 +352,7 @@ integration-test: dev ## Run Nomad integration tests
-timeout=900s \
-count=1 \
-tags "$(GO_TAGS)" \
github.com/hashicorp/nomad/e2e/vaultcompat
github.com/hashicorp/nomad/v2/e2e/vaultcompat

.PHONY: integration-test-consul
integration-test-consul: dev ## Run Nomad integration tests
Expand All @@ -363,7 +363,7 @@ integration-test-consul: dev ## Run Nomad integration tests
-timeout=900s \
-count=1 \
-tags "$(GO_TAGS)" \
github.com/hashicorp/nomad/e2e/consulcompat
github.com/hashicorp/nomad/v2/e2e/consulcompat

.PHONY: integration-test-client-intro
integration-test-client-intro: dev ## Run Nomad's Client Intro integration tests
Expand All @@ -374,7 +374,7 @@ integration-test-client-intro: dev ## Run Nomad's Client Intro integration tests
-timeout=120s \
-count=1 \
-tags "$(GO_TAGS)" \
github.com/hashicorp/nomad/e2e/client_intro
github.com/hashicorp/nomad/v2/e2e/client_intro

.PHONY: clean
clean: GOPATH=$(shell go env GOPATH)
Expand Down
2 changes: 1 addition & 1 deletion acl/acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package acl
import (
"testing"

"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/v2/ci"
"github.com/shoenig/test/must"
)

Expand Down
2 changes: 1 addition & 1 deletion acl/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/v2/ci"
"github.com/shoenig/test"
"github.com/shoenig/test/must"
)
Expand Down
4 changes: 2 additions & 2 deletions client/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

metrics "github.com/hashicorp/go-metrics/compat"
"github.com/hashicorp/go-set/v3"
"github.com/hashicorp/nomad/acl"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/v2/acl"
"github.com/hashicorp/nomad/v2/nomad/structs"
)

const (
Expand Down
14 changes: 7 additions & 7 deletions client/acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"testing"
"time"

"github.com/hashicorp/nomad/acl"
"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/helper/uuid"
"github.com/hashicorp/nomad/nomad/mock"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/testutil"
"github.com/hashicorp/nomad/v2/acl"
"github.com/hashicorp/nomad/v2/ci"
"github.com/hashicorp/nomad/v2/client/config"
"github.com/hashicorp/nomad/v2/helper/uuid"
"github.com/hashicorp/nomad/v2/nomad/mock"
"github.com/hashicorp/nomad/v2/nomad/structs"
"github.com/hashicorp/nomad/v2/testutil"
"github.com/shoenig/test"
"github.com/shoenig/test/must"
"github.com/shoenig/test/wait"
Expand Down
12 changes: 6 additions & 6 deletions client/agent_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
log "github.com/hashicorp/go-hclog"
metrics "github.com/hashicorp/go-metrics/compat"
"github.com/hashicorp/go-msgpack/v2/codec"
sframer "github.com/hashicorp/nomad/client/lib/streamframer"
cstructs "github.com/hashicorp/nomad/client/structs"
"github.com/hashicorp/nomad/command/agent/host"
"github.com/hashicorp/nomad/command/agent/monitor"
"github.com/hashicorp/nomad/command/agent/pprof"
"github.com/hashicorp/nomad/nomad/structs"
sframer "github.com/hashicorp/nomad/v2/client/lib/streamframer"
cstructs "github.com/hashicorp/nomad/v2/client/structs"
"github.com/hashicorp/nomad/v2/command/agent/host"
"github.com/hashicorp/nomad/v2/command/agent/monitor"
"github.com/hashicorp/nomad/v2/command/agent/pprof"
"github.com/hashicorp/nomad/v2/nomad/structs"
)

type Agent struct {
Expand Down
22 changes: 11 additions & 11 deletions client/agent_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import (
"time"

"github.com/hashicorp/go-msgpack/v2/codec"
"github.com/hashicorp/nomad/acl"
"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/client/config"
sframer "github.com/hashicorp/nomad/client/lib/streamframer"
cstructs "github.com/hashicorp/nomad/client/structs"
"github.com/hashicorp/nomad/command/agent/monitor"
"github.com/hashicorp/nomad/command/agent/pprof"
"github.com/hashicorp/nomad/nomad"
"github.com/hashicorp/nomad/nomad/mock"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/testutil"
"github.com/hashicorp/nomad/v2/acl"
"github.com/hashicorp/nomad/v2/ci"
"github.com/hashicorp/nomad/v2/client/config"
sframer "github.com/hashicorp/nomad/v2/client/lib/streamframer"
cstructs "github.com/hashicorp/nomad/v2/client/structs"
"github.com/hashicorp/nomad/v2/command/agent/monitor"
"github.com/hashicorp/nomad/v2/command/agent/pprof"
"github.com/hashicorp/nomad/v2/nomad"
"github.com/hashicorp/nomad/v2/nomad/mock"
"github.com/hashicorp/nomad/v2/nomad/structs"
"github.com/hashicorp/nomad/v2/testutil"
"github.com/shoenig/test/must"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
12 changes: 6 additions & 6 deletions client/alloc_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (

metrics "github.com/hashicorp/go-metrics/compat"
"github.com/hashicorp/go-msgpack/v2/codec"
"github.com/hashicorp/nomad/acl"
cstructs "github.com/hashicorp/nomad/client/structs"
"github.com/hashicorp/nomad/helper/uuid"
nstructs "github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/plugins/drivers"
"github.com/hashicorp/nomad/plugins/drivers/fsisolation"
"github.com/hashicorp/nomad/v2/acl"
cstructs "github.com/hashicorp/nomad/v2/client/structs"
"github.com/hashicorp/nomad/v2/helper/uuid"
nstructs "github.com/hashicorp/nomad/v2/nomad/structs"
"github.com/hashicorp/nomad/v2/plugins/drivers"
"github.com/hashicorp/nomad/v2/plugins/drivers/fsisolation"
)

// Allocations endpoint is used for interacting with client allocations
Expand Down
26 changes: 13 additions & 13 deletions client/alloc_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import (
"time"

"github.com/hashicorp/go-msgpack/v2/codec"
"github.com/hashicorp/nomad/acl"
"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/client/lib/proclib"
cstructs "github.com/hashicorp/nomad/client/structs"
"github.com/hashicorp/nomad/helper/pluginutils/catalog"
"github.com/hashicorp/nomad/helper/uuid"
"github.com/hashicorp/nomad/nomad"
"github.com/hashicorp/nomad/nomad/mock"
nstructs "github.com/hashicorp/nomad/nomad/structs"
nconfig "github.com/hashicorp/nomad/nomad/structs/config"
"github.com/hashicorp/nomad/plugins/drivers"
"github.com/hashicorp/nomad/testutil"
"github.com/hashicorp/nomad/v2/acl"
"github.com/hashicorp/nomad/v2/ci"
"github.com/hashicorp/nomad/v2/client/config"
"github.com/hashicorp/nomad/v2/client/lib/proclib"
cstructs "github.com/hashicorp/nomad/v2/client/structs"
"github.com/hashicorp/nomad/v2/helper/pluginutils/catalog"
"github.com/hashicorp/nomad/v2/helper/uuid"
"github.com/hashicorp/nomad/v2/nomad"
"github.com/hashicorp/nomad/v2/nomad/mock"
nstructs "github.com/hashicorp/nomad/v2/nomad/structs"
nconfig "github.com/hashicorp/nomad/v2/nomad/structs/config"
"github.com/hashicorp/nomad/v2/plugins/drivers"
"github.com/hashicorp/nomad/v2/testutil"
"github.com/shoenig/test/must"
"github.com/stretchr/testify/require"
"golang.org/x/sys/unix"
Expand Down
14 changes: 7 additions & 7 deletions client/alloc_watcher_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"path/filepath"
"testing"

"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/command/agent"
"github.com/hashicorp/nomad/nomad"
"github.com/hashicorp/nomad/nomad/mock"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/nomad/structs/config"
"github.com/hashicorp/nomad/testutil"
"github.com/hashicorp/nomad/v2/ci"
"github.com/hashicorp/nomad/v2/command/agent"
"github.com/hashicorp/nomad/v2/nomad"
"github.com/hashicorp/nomad/v2/nomad/mock"
"github.com/hashicorp/nomad/v2/nomad/structs"
"github.com/hashicorp/nomad/v2/nomad/structs/config"
"github.com/hashicorp/nomad/v2/testutil"
"github.com/stretchr/testify/require"
)

Expand Down
6 changes: 3 additions & 3 deletions client/allocdir/alloc_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (

hclog "github.com/hashicorp/go-hclog"
multierror "github.com/hashicorp/go-multierror"
cstructs "github.com/hashicorp/nomad/client/structs"
"github.com/hashicorp/nomad/helper/escapingfs"
"github.com/hashicorp/nomad/nomad/structs"
cstructs "github.com/hashicorp/nomad/v2/client/structs"
"github.com/hashicorp/nomad/v2/helper/escapingfs"
"github.com/hashicorp/nomad/v2/nomad/structs"
"github.com/hpcloud/tail/watch"
tomb "gopkg.in/tomb.v1"
)
Expand Down
8 changes: 4 additions & 4 deletions client/allocdir/alloc_dir_nonlinux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"path/filepath"
"testing"

"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/helper/testlog"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/plugins/drivers/fsisolation"
"github.com/hashicorp/nomad/v2/ci"
"github.com/hashicorp/nomad/v2/helper/testlog"
"github.com/hashicorp/nomad/v2/nomad/structs"
"github.com/hashicorp/nomad/v2/plugins/drivers/fsisolation"
"github.com/shoenig/test/must"
)

Expand Down
8 changes: 4 additions & 4 deletions client/allocdir/alloc_dir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"syscall"
"testing"

"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/helper/testlog"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/plugins/drivers/fsisolation"
"github.com/hashicorp/nomad/v2/ci"
"github.com/hashicorp/nomad/v2/helper/testlog"
"github.com/hashicorp/nomad/v2/nomad/structs"
"github.com/hashicorp/nomad/v2/plugins/drivers/fsisolation"
"github.com/shoenig/test/must"
"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion client/allocdir/fs_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/v2/ci"
"github.com/shoenig/test/must"
"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion client/allocdir/fs_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strconv"
"syscall"

"github.com/hashicorp/nomad/helper/users"
"github.com/hashicorp/nomad/v2/helper/users"
"golang.org/x/sys/unix"
)

Expand Down
4 changes: 2 additions & 2 deletions client/allocdir/input/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package test

import (
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/plugins/device"
"github.com/hashicorp/nomad/v2/nomad/structs"
"github.com/hashicorp/nomad/v2/plugins/device"
)

type Client interface {
Expand Down
4 changes: 2 additions & 2 deletions client/allocdir/task_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/go-set/v3"
"github.com/hashicorp/nomad/helper/users/dynamic"
"github.com/hashicorp/nomad/plugins/drivers/fsisolation"
"github.com/hashicorp/nomad/v2/helper/users/dynamic"
"github.com/hashicorp/nomad/v2/plugins/drivers/fsisolation"
)

const (
Expand Down
Loading
Loading