Skip to content

Commit 98d16d3

Browse files
committed
Merge branch 'master' into release-v0.1.26
Signed-off-by: Anthony Floeder <anthony.floeder@hpe.com>
2 parents fc76176 + 89c6cc5 commit 98d16d3

6 files changed

Lines changed: 73 additions & 44 deletions

File tree

Makefile

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endif
99
export PATH := $(HOME)/go/bin:$(PATH)
1010

1111
# Base command to start the tests with ginkgo
12-
GINKGO_RUN?=CGO_ENABLED=0 ginkgo run ${PARALLEL_OPT} --v
12+
GINKGO_RUN?=CGO_ENABLED=0 ginkgo run ${PARALLEL_OPT} --v --fail-fast
1313

1414
all: fmt vet
1515

@@ -22,9 +22,19 @@ vet:
2222
go vet ./...
2323

2424
# TODO: would be nice to tie this to a script that also deletes all the workflows and makes sure nothing is left over
25+
# Clean up resources that may be left behind by interrupted test runs
2526
.PHONY: clean
2627
clean:
28+
@echo "Removing triage namespace..."
2729
kubectl delete namespace nnf-system-needs-triage --ignore-not-found
30+
@echo "Removing leftover UID verification pods..."
31+
kubectl delete pods -n default --ignore-not-found $$(kubectl get pods -n default --no-headers -o custom-columns=':metadata.name' 2>/dev/null | grep '^verify-uid-') 2>/dev/null; true
32+
@echo "Checking for persistent storage instances..."
33+
@psi=$$(kubectl get persistentstorageinstances -A --no-headers 2>/dev/null); \
34+
if [ -n "$$psi" ]; then \
35+
echo "WARNING: Persistent storage instances still exist. These require a destroy_persistent workflow to remove:" >&2; \
36+
echo "$$psi" >&2; \
37+
fi
2838

2939
.PHONY: init
3040
init:
@@ -33,12 +43,22 @@ init:
3343
# Run all the tests
3444
.PHONY: test
3545
test:
36-
${GINKGO_RUN} .
46+
@if kubectl config current-context 2>/dev/null | grep -q 'kind-'; then \
47+
echo "Detected kind cluster. Switching to 'make kind' (excludes global-lustre tests)." >&2; \
48+
$(MAKE) kind; \
49+
else \
50+
${GINKGO_RUN} . ; \
51+
fi
3752

3853
# Alias for all the tests
3954
.PHONY: full
4055
full: test
4156

57+
# Run tests compatible with a kind environment (excludes tests requiring real Lustre mounts)
58+
.PHONY: kind
59+
kind:
60+
${GINKGO_RUN} --label-filter='!global-lustre && !multi-storage && !lustre-csimount && !high-capacity' .
61+
4262
# Run one test to ensure system is in working order
4363
.PHONY: sanity
4464
sanity:

go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/NearNodeFlash/nnf-integration-test
33
go 1.25.7
44

55
require (
6-
github.com/DataWorkflowServices/dws v0.0.1-0.20260316202252-4e24ce7ae372
7-
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20260409140943-c59379bba6df
6+
github.com/DataWorkflowServices/dws v0.0.1-0.20260506165801-7e73c2416704
7+
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20260506210158-1c2551dfbf1c
88
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20260310162051-7797cd568379 // indirect
9-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20260409160114-bcb00b928378
9+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20260507014732-f747aca10125
1010
github.com/onsi/ginkgo/v2 v2.22.2
1111
github.com/onsi/gomega v1.36.2
1212
go.openly.dev/pointy v1.3.0
@@ -19,25 +19,25 @@ require (
1919

2020
require (
2121
github.com/beorn7/perks v1.0.1 // indirect
22-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
22+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2323
github.com/davecgh/go-spew v1.1.1 // indirect
2424
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
2525
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
2626
github.com/fsnotify/fsnotify v1.6.0 // indirect
27-
github.com/go-logr/logr v1.4.2 // indirect
27+
github.com/go-logr/logr v1.4.3 // indirect
2828
github.com/go-logr/zapr v1.2.4 // indirect
2929
github.com/go-openapi/jsonpointer v0.19.6 // indirect
3030
github.com/go-openapi/jsonreference v0.20.2 // indirect
3131
github.com/go-openapi/swag v0.22.3 // indirect
3232
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
3333
github.com/gogo/protobuf v1.3.2 // indirect
3434
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
35-
github.com/golang/protobuf v1.5.3 // indirect
35+
github.com/golang/protobuf v1.5.4 // indirect
3636
github.com/google/gnostic-models v0.6.8 // indirect
37-
github.com/google/go-cmp v0.6.0 // indirect
37+
github.com/google/go-cmp v0.7.0 // indirect
3838
github.com/google/gofuzz v1.2.0 // indirect
3939
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
40-
github.com/google/uuid v1.3.1 // indirect
40+
github.com/google/uuid v1.6.0 // indirect
4141
github.com/imdario/mergo v0.3.16 // indirect
4242
github.com/josharian/intern v1.0.0 // indirect
4343
github.com/json-iterator/go v1.1.12 // indirect
@@ -63,7 +63,7 @@ require (
6363
golang.org/x/time v0.3.0 // indirect
6464
golang.org/x/tools v0.41.0 // indirect
6565
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
66-
google.golang.org/protobuf v1.36.1 // indirect
66+
google.golang.org/protobuf v1.36.10 // indirect
6767
gopkg.in/inf.v0 v0.9.1 // indirect
6868
gopkg.in/yaml.v2 v2.4.0 // indirect
6969
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
github.com/DataWorkflowServices/dws v0.0.1-0.20260316202252-4e24ce7ae372 h1:XHGgQFKImeAzM2CNNnCshrpf8NoDDplh6V0u7keVMbU=
2-
github.com/DataWorkflowServices/dws v0.0.1-0.20260316202252-4e24ce7ae372/go.mod h1:4zp8Ar95lcBjmk/GavkALeIGP9btG176rFQ08XQtVXE=
3-
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20260409140943-c59379bba6df h1:5S/AIw9QwGvceNvSYnFdeH0pRyb8EEdya9exLwj1j+Y=
4-
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20260409140943-c59379bba6df/go.mod h1:TZFQc3lV1bX3ufKsKUzP6pQx+ujLJTA2Z/zkPjAun5U=
1+
github.com/DataWorkflowServices/dws v0.0.1-0.20260506165801-7e73c2416704 h1:/bbdHCdc+M0tIsO+Q/VOob+P56v4P9BNpGeWmtKDgB0=
2+
github.com/DataWorkflowServices/dws v0.0.1-0.20260506165801-7e73c2416704/go.mod h1:4zp8Ar95lcBjmk/GavkALeIGP9btG176rFQ08XQtVXE=
3+
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20260506210158-1c2551dfbf1c h1:7uPTARsFc5vAVOuTNAsKzeFVwrGun+THd27UvyedQdE=
4+
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20260506210158-1c2551dfbf1c/go.mod h1:pYIaXNmF3wOZ/RS+VctciIjPymE2n5oVOTslkYywvnw=
55
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20260310162051-7797cd568379 h1:kZHhYVMa2KdBpdXbAtnE5DSu6pN/9VEVU2t8wPUAqaY=
66
github.com/NearNodeFlash/nnf-ec v0.0.1-0.20260310162051-7797cd568379/go.mod h1:vJXM5DUx6FZtK8yuYNMSv2O1mfUmrpRVuRZp/o/NDRs=
7-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20260409160114-bcb00b928378 h1:RKTFWSDkZ42YOkTpzYndzHy7bYyWQ/PW4QosxQoQDDA=
8-
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20260409160114-bcb00b928378/go.mod h1:3qSSwBwOSfEJMFJ7W3pkAmemwZiy4qT41ne41HZjt2Y=
7+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20260507014732-f747aca10125 h1:5DbVTbtwY35+pTVtbC2YgcwHFHyNhWQSXnfNS1lWxOs=
8+
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20260507014732-f747aca10125/go.mod h1:QX2lh2QCBZjorvqomgrG4tbHg2fvSUpiEPlaD1d+rqI=
99
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
1010
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
1111
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
1212
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
1313
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
14-
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
15-
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
14+
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
15+
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
1616
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
1717
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1818
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -27,8 +27,8 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4
2727
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
2828
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
2929
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
30-
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
31-
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
30+
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
31+
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
3232
github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo=
3333
github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA=
3434
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
@@ -44,21 +44,19 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
4444
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
4545
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
4646
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
47-
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
48-
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
49-
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
47+
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
48+
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
5049
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
5150
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
52-
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
53-
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
54-
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
51+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
52+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
5553
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
5654
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
5755
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
5856
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg=
5957
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
60-
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
61-
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
58+
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
59+
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
6260
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
6361
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
6462
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
@@ -191,10 +189,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
191189
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
192190
gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw=
193191
gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
194-
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
195-
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
196-
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
197-
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
192+
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
193+
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
198194
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
199195
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
200196
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

int_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ var tests = []*T{
8787

8888
// GFS2 Fence
8989
MakeTest("GFS2 Fence", "#DW jobdw type=gfs2 name=gfs2-fence capacity=50GB").WithLabels(GFS2Fence).
90+
RequiresHardware().
9091
DelayInState(dwsv1alpha7.StateDataIn, 15*time.Second). // start pacemaker
9192
DelayInState(dwsv1alpha7.StatePreRun, 60*time.Second). // fence node(s)
9293
DelayInState(dwsv1alpha7.StateDataOut, 15*time.Second), // stop pacemaker on surviving node(s)
@@ -102,7 +103,8 @@ var tests = []*T{
102103
// WithStorageProfile().DelayInState(dwsv1alpha7.StateDataIn, 15*time.Second).StopAfter(dwsv1alpha7.StatePreRun).Focused(),
103104
MakeTest("XFS with Storage Profile and LV Create",
104105
"#DW jobdw type=xfs name=xfs-storage-profile capacity=14TB profile=my-xfs-storage-profile").
105-
WithStorageProfileLvCreate("--zero n --activate y --type raid5 --nosync --extents $PERCENT_VG --stripes $DEVICE_NUM-1 --stripesize=64KiB --name $LV_NAME $VG_NAME"),
106+
WithStorageProfileLvCreate("--zero n --activate y --type raid5 --nosync --extents $PERCENT_VG --stripes $DEVICE_NUM-1 --stripesize=64KiB --name $LV_NAME $VG_NAME").
107+
WithLabels("high-capacity"),
106108

107109
// Persistent
108110
MakeTest("Persistent Lustre",
@@ -150,7 +152,7 @@ var tests = []*T{
150152
"#DW jobdw type=lustre name=lustre-with-containers-mpi capacity=100GB",
151153
"#DW container name=lustre-with-containers-mpi profile=example-mpi "+
152154
"DW_JOB_foo_local_storage=lustre-with-containers-mpi").
153-
WithPermissions(userID, groupID).WithLabels("mpi"),
155+
WithPermissions(userID, groupID).WithLabels("mpi", "lustre-csimount"),
154156
MakeTest("GFS2 and Global Lustre with MPI Containers",
155157
"#DW jobdw type=gfs2 name=gfs2-and-global-with-containers-mpi capacity=100GB",
156158
"#DW container name=gfs2-and-global-with-containers-mpi profile=example-mpi "+
@@ -217,15 +219,15 @@ var tests = []*T{
217219
WithContainerProfile("example-fail", &ContainerProfileOptions{RetryLimit: pointy.Int(0)}).
218220
ExpectError(dwsv1alpha7.StatePostRun),
219221

220-
// Containers - Unsupported Filesystems. These should fail as xfs/raw filesystems are not supported for containers.
222+
// Containers - Unsupported Filesystems. XFS is not supported for containers.
221223
MakeTest("XFS with Containers",
222224
"#DW jobdw type=xfs name=xfs-with-containers capacity=100GB",
223225
"#DW container name=xfs-with-containers profile=example-success DW_JOB_foo_local_storage=xfs-with-containers").
224226
ExpectError(dwsv1alpha7.StateProposal).WithLabels("unsupported-fs"),
225227
MakeTest("Raw with Containers",
226228
"#DW jobdw type=raw name=raw-with-containers capacity=100GB",
227229
"#DW container name=raw-with-containers profile=example-success DW_JOB_foo_local_storage=raw-with-containers").
228-
ExpectError(dwsv1alpha7.StateProposal).WithLabels("unsupported-fs"),
230+
WithPermissions(userID, groupID).WithLabels("non-mpi"),
229231

230232
// Containers - Multiple Storages
231233
MakeTest("GFS2 and Lustre with Containers",

internal/options.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ func (t *T) DelayInState(state dwsv1alpha7.WorkflowState, duration time.Duration
8989
return t
9090
}
9191

92+
// RequiresHardware marks a test as requiring real hardware (skipped in kind environments).
93+
func (t *T) RequiresHardware() *T {
94+
t.options.hardwareRequired = true
95+
return t
96+
}
97+
9298
type TExpectError struct {
9399
state dwsv1alpha7.WorkflowState
94100
}
@@ -294,11 +300,12 @@ func (t *T) WithGlobalLustreFromPersistentLustre(name string, namespaces []strin
294300
fsType = args["type"]
295301
}
296302

297-
if args["command"] == "copy_in" {
303+
switch args["command"] {
304+
case "copy_in":
298305
if path, found := args["source"]; found {
299306
t.options.globalLustre.in = path
300307
}
301-
} else if args["command"] == "copy_out" {
308+
case "copy_out":
302309
if path, found := args["destination"]; found {
303310
// Account for index mount directories in the path. This only works for file-file
304311
// data movement to assume where the '*' goes for the index mount directories.
@@ -433,9 +440,11 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
433440
capacity := o.persistentLustre.capacity
434441

435442
o.persistentLustre.create = MakeTest(name+"-create",
436-
fmt.Sprintf("#DW create_persistent type=lustre name=%s capacity=%s", name, capacity))
443+
fmt.Sprintf("#DW create_persistent type=lustre name=%s capacity=%s", name, capacity)).
444+
WithPermissions(t.workflow.Spec.UserID, t.workflow.Spec.GroupID)
437445
o.persistentLustre.destroy = MakeTest(name+"-destroy",
438-
fmt.Sprintf("#DW destroy_persistent name=%s", name))
446+
fmt.Sprintf("#DW destroy_persistent name=%s", name)).
447+
WithPermissions(t.workflow.Spec.UserID, t.workflow.Spec.GroupID)
439448

440449
// Create the persistent lustre instance
441450
By(fmt.Sprintf("Creating persistent lustre instance '%s'", name))
@@ -590,7 +599,8 @@ func (t *T) Cleanup(ctx context.Context, k8sClient client.Client) error {
590599
name := o.cleanupPersistent.name
591600
By(fmt.Sprintf("Destroying persistent filesystem '%s'", name))
592601

593-
test := MakeTest(name+"-destroy", fmt.Sprintf("#DW destroy_persistent name=%s", name))
602+
test := MakeTest(name+"-destroy", fmt.Sprintf("#DW destroy_persistent name=%s", name)).
603+
WithPermissions(t.workflow.Spec.UserID, t.workflow.Spec.GroupID)
594604
Expect(k8sClient.Create(ctx, test.Workflow())).To(Succeed())
595605
test.Execute(ctx, k8sClient)
596606
Expect(k8sClient.Delete(ctx, test.Workflow())).To(Succeed())

internal/utils.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,12 @@ func runHelperPod(ctx context.Context, k8sClient client.Client, t *T, name, comm
254254
Expect(k8sClient.Create(ctx, pod)).To(Succeed())
255255
t.helperPods = append(t.helperPods, pod)
256256

257-
// Wait for successful completion
257+
// Wait for successful completion. Use a generous timeout to account for
258+
// image pulls which can take several minutes on a cold cache.
258259
Eventually(func(g Gomega) bool {
259260
g.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(pod), pod)).To(Succeed())
260261
return pod.Status.Phase == corev1.PodSucceeded
261-
}).WithTimeout(time.Minute).WithPolling(time.Second).Should(BeTrue())
262+
}).WithTimeout(5 * time.Minute).WithPolling(time.Second).Should(BeTrue())
262263
}
263264

264265
// HasContainerDirective returns true if this test includes a #DW container directive.

0 commit comments

Comments
 (0)