gitlab.com/evatix-go/core@v1.3.55/tests/integratedtests/chmodhelpertests/assertSingleChmod.go (about) 1 package chmodhelpertests 2 3 import ( 4 "fmt" 5 "testing" 6 7 "github.com/smartystreets/goconvey/convey" 8 "gitlab.com/evatix-go/core/chmodhelper" 9 "gitlab.com/evatix-go/core/errcore" 10 ) 11 12 // assertSingleChmod , expectedChmodRwxFullString 10 chars "-rwxrwxrwx" 13 func assertSingleChmod( 14 t *testing.T, 15 testHeader string, 16 createPath *chmodhelper.DirFilesWithRwxPermission, 17 expectedChmodRwxFullString string, 18 ) { 19 fileChmodMap := createPath.GetFilesChmodMap() 20 for filePath, chmodValueString := range fileChmodMap.Items() { 21 convey.Convey(testHeader, t, func() { 22 isEqual := chmodValueString == expectedChmodRwxFullString 23 24 if !isEqual { 25 fmt.Println( 26 errcore.Expecting( 27 filePath, 28 expectedChmodRwxFullString, 29 chmodValueString)) 30 31 } 32 33 convey.So(isEqual, convey.ShouldBeTrue) 34 }) 35 } 36 }