gitlab.com/evatix-go/core@v1.3.55/tests/integratedtests/chmodhelpertests/VerifyPartialRwxLocations_test.go (about) 1 package chmodhelpertests 2 3 import ( 4 "testing" 5 6 . "github.com/smartystreets/goconvey/convey" 7 "gitlab.com/evatix-go/core/chmodhelper" 8 "gitlab.com/evatix-go/core/coretests" 9 "gitlab.com/evatix-go/core/errcore" 10 "gitlab.com/evatix-go/core/tests/testwrappers/chmodhelpertestwrappers" 11 ) 12 13 func Test_VerifyRwxPartialChmodLocations_Unix(t *testing.T) { 14 coretests.SkipOnWindows(t) 15 16 // Arrange 17 createPathInstructions := chmodhelpertestwrappers.CreatePathInstruction2 18 chmodhelper.CreateDirFilesWithRwxPermissionsMust( 19 true, 20 &createPathInstructions) 21 for caseIndex, testCase := range chmodhelpertestwrappers.VerifyRwxPartialChmodLocationsTestCases { 22 header := testCase.Header 23 expectationMessage := testCase.ExpectationErrorMessage 24 25 // Act 26 err := chmodhelper.ChmodVerify.PathsUsingPartialRwxOptions( 27 testCase.IsContinueOnError, 28 testCase.IsSkipOnInvalid, 29 testCase.ExpectedPartialRwx, 30 testCase.Locations...) 31 32 expectation := &errcore.ExpectationMessageDef{ 33 CaseIndex: caseIndex, 34 FuncName: "Test_VerifyRwxPartialChmodLocations_Unix", 35 TestCaseName: "VerifyRwxPartialChmodLocationsTestCases", 36 When: testCase.Header, 37 Expected: expectationMessage, 38 IsNonWhiteSort: true, 39 } 40 41 // Assert 42 Convey(header, t, func() { 43 isEqual := coretests.IsErrorNonWhiteSortedEqual( 44 true, 45 err, 46 expectation) 47 48 So(isEqual, ShouldBeTrue) 49 }) 50 } 51 }