@@ -21,14 +21,15 @@ package test
2121
2222import (
2323 "fmt"
24+ "time"
2425
2526 . "github.com/NearNodeFlash/nnf-integration-test/internal"
2627
2728 . "github.com/onsi/ginkgo/v2"
2829 . "github.com/onsi/gomega"
2930 "go.openly.dev/pointy"
3031
31- dwsv1alpha6 "github.com/DataWorkflowServices/dws/api/v1alpha6 "
32+ dwsv1alpha7 "github.com/DataWorkflowServices/dws/api/v1alpha7 "
3233)
3334
3435var (
4142 highTimeout = "5m"
4243
4344 // Which states use the high timeout
44- highTimeoutStates = []dwsv1alpha6 .WorkflowState {
45- dwsv1alpha6 .StateSetup ,
46- dwsv1alpha6 .StateTeardown ,
45+ highTimeoutStates = []dwsv1alpha7 .WorkflowState {
46+ dwsv1alpha7 .StateSetup ,
47+ dwsv1alpha7 .StateTeardown ,
4748 }
4849)
4950
@@ -56,8 +57,12 @@ var tests = []*T{
5657 // Mark a test case as Pending(). Ginkgo will not run any tests that have the Pending decorator
5758 // MakeTest("Pending", "#DW ...").Pending()
5859 //
59- // Mark a test case so it will stop after the workflow achieves the desired state of PreRun
60- // MakeTest("Stop After", "#DW ...").StopAfter(wsv1alpha1.StatePreRun),
60+ // Mark a test case, so it will stop after the workflow achieves the desired state of PreRun
61+ // MakeTest("Stop After", "#DW ...").StopAfter(dwsv1alpha7.StatePreRun),
62+ //
63+ // Mark a test case, so it delays for the specified period after a workflow achieves the desired state
64+ // Multiple delays can be added by calling DelayInState multiple times.
65+ // MakeTest("Delay In State", "#DW ...").DelayInState(dwsv1alpha7.StateDataIn, 2*time.Minute).DelayInState(dwsv1alpha7.StateDataOut, 2*time.Minute),
6166 //
6267 // Duplicate a test case 20 times.
6368 // DuplicateTest(
@@ -73,13 +78,24 @@ var tests = []*T{
7378 // External Computes
7479 MakeTest ("Lustre External" , "#DW jobdw type=lustre name=lustre capacity=50GB" ).WithExternalComputes ().WithLabels (ExternalLustre ),
7580
81+ // GFS2 Fence
82+ MakeTest ("GFS2 Fence" , "#DW jobdw type=gfs2 name=gfs2-fence capacity=50GB" ).WithLabels (GFS2Fence ).
83+ DelayInState (dwsv1alpha7 .StateDataIn , 15 * time .Second ). // start pacemaker
84+ DelayInState (dwsv1alpha7 .StatePreRun , 60 * time .Second ). // fence node(s)
85+ DelayInState (dwsv1alpha7 .StateDataOut , 15 * time .Second ), // stop pacemaker on surviving node(s)
86+
7687 // Storage Profiles
7788 MakeTest ("XFS with Storage Profile" ,
7889 "#DW jobdw type=xfs name=xfs-storage-profile capacity=50GB profile=my-xfs-storage-profile" ).
7990 WithStorageProfile (),
8091 MakeTest ("GFS2 with Storage Profile" ,
8192 "#DW jobdw type=gfs2 name=gfs2-storage-profile capacity=50GB profile=my-gfs2-storage-profile" ).
8293 WithStorageProfile (),
94+ // WithStorageProfile().DelayInState(dwsv1alpha7.StateDataIn, 15*time.Second).DelayInState(dwsv1alpha7.StateDataOut, 15*time.Second).Focused(), // Useful for debugging
95+ // WithStorageProfile().DelayInState(dwsv1alpha7.StateDataIn, 15*time.Second).StopAfter(dwsv1alpha7.StatePreRun).Focused(),
96+ MakeTest ("XFS with Storage Profile and LV Create" ,
97+ "#DW jobdw type=xfs name=xfs-storage-profile capacity=14TB profile=my-xfs-storage-profile" ).
98+ WithStorageProfileLvCreate ("--zero n --activate y --type raid5 --nosync --extents $PERCENT_VG --stripes $DEVICE_NUM-1 --stripesize=64KiB --name $LV_NAME $VG_NAME" ),
8399
84100 // Persistent
85101 MakeTest ("Persistent Lustre" ,
@@ -143,17 +159,17 @@ var tests = []*T{
143159 "#DW container name=prerun-timeout-mpi profile=example-mpi-prerun-timeout" ).
144160 WithPermissions (1050 , 1051 ).WithLabels ("mpi" , "timeout" ).
145161 WithContainerProfile ("example-mpi" , & ContainerProfileOptions {PrerunTimeoutSeconds : pointy .Int (1 ), NoStorage : true }).
146- ExpectError (dwsv1alpha6 .StatePreRun ),
162+ ExpectError (dwsv1alpha7 .StatePreRun ),
147163 MakeTest ("PostRun timeout on MPI containers" ,
148164 "#DW container name=postrun-timeout-mpi profile=example-mpi-postrun-timeout" ).
149165 WithPermissions (1050 , 1051 ).WithLabels ("mpi" , "timeout" ).
150166 WithContainerProfile ("example-mpi-webserver" , & ContainerProfileOptions {PostrunTimeoutSeconds : pointy .Int (1 ), NoStorage : true }).
151- ExpectError (dwsv1alpha6 .StatePostRun ),
167+ ExpectError (dwsv1alpha7 .StatePostRun ),
152168 MakeTest ("Non-zero exit on MPI containers" ,
153169 "#DW container name=mpi-container-fail profile=example-mpi-fail-noretry" ).
154170 WithPermissions (1050 , 1051 ).WithLabels ("mpi" , "fail" ).
155171 WithContainerProfile ("example-mpi-fail" , & ContainerProfileOptions {RetryLimit : pointy .Int (0 )}).
156- ExpectError (dwsv1alpha6 .StatePostRun ),
172+ ExpectError (dwsv1alpha7 .StatePostRun ),
157173
158174 // Containers - Non-MPI
159175 MakeTest ("GFS2 with Containers" ,
@@ -175,27 +191,27 @@ var tests = []*T{
175191 "#DW container name=prerun-timeout profile=example-prerun-timeout" ).
176192 WithPermissions (1050 , 1051 ).WithLabels ("non-mpi" , "timeout" ).
177193 WithContainerProfile ("example-forever" , & ContainerProfileOptions {PrerunTimeoutSeconds : pointy .Int (1 ), NoStorage : true }).
178- ExpectError (dwsv1alpha6 .StatePreRun ),
194+ ExpectError (dwsv1alpha7 .StatePreRun ),
179195 MakeTest ("PostRun timeout on non-MPI containers" ,
180196 "#DW container name=postrun-timeout profile=example-postrun-timeout" ).
181197 WithPermissions (1050 , 1051 ).WithLabels ("non-mpi" , "timeout" ).
182198 WithContainerProfile ("example-forever" , & ContainerProfileOptions {PostrunTimeoutSeconds : pointy .Int (1 ), NoStorage : true }).
183- ExpectError (dwsv1alpha6 .StatePostRun ),
199+ ExpectError (dwsv1alpha7 .StatePostRun ),
184200 MakeTest ("Non-zero exit on non-MPI containers" ,
185201 "#DW container name=container-fail profile=example-fail-noretry" ).
186202 WithPermissions (1050 , 1051 ).WithLabels ("non-mpi" , "fail" ).
187203 WithContainerProfile ("example-fail" , & ContainerProfileOptions {RetryLimit : pointy .Int (0 )}).
188- ExpectError (dwsv1alpha6 .StatePostRun ),
204+ ExpectError (dwsv1alpha7 .StatePostRun ),
189205
190206 // Containers - Unsupported Filesystems. These should fail as xfs/raw filesystems are not supported for containers.
191207 MakeTest ("XFS with Containers" ,
192208 "#DW jobdw type=xfs name=xfs-with-containers capacity=100GB" ,
193209 "#DW container name=xfs-with-containers profile=example-success DW_JOB_foo_local_storage=xfs-with-containers" ).
194- ExpectError (dwsv1alpha6 .StateProposal ).WithLabels ("unsupported-fs" ),
210+ ExpectError (dwsv1alpha7 .StateProposal ).WithLabels ("unsupported-fs" ),
195211 MakeTest ("Raw with Containers" ,
196212 "#DW jobdw type=raw name=raw-with-containers capacity=100GB" ,
197213 "#DW container name=raw-with-containers profile=example-success DW_JOB_foo_local_storage=raw-with-containers" ).
198- ExpectError (dwsv1alpha6 .StateProposal ).WithLabels ("unsupported-fs" ),
214+ ExpectError (dwsv1alpha7 .StateProposal ).WithLabels ("unsupported-fs" ),
199215
200216 // Containers - Multiple Storages
201217 MakeTest ("GFS2 and Lustre with Containers" ,
@@ -250,7 +266,7 @@ var _ = Describe("NNF Integration Test", func() {
250266 // TODO: Ginkgo's `--fail-fast` option still seems to execute DeferCleanup() calls
251267 // See if this is by design or if we might need to move this to an AfterEach()
252268 if ! context .SpecReport ().Failed () {
253- t .AdvanceStateAndWaitForReady (ctx , k8sClient , workflow , dwsv1alpha6 .StateTeardown )
269+ t .AdvanceStateAndWaitForReady (ctx , k8sClient , workflow , dwsv1alpha7 .StateTeardown )
254270
255271 Expect (k8sClient .Delete (ctx , workflow )).To (Succeed ())
256272 }
0 commit comments