gitlab.com/evatix-go/core@v1.3.55/tests/integratedtests/chmodhelpertests/applyPathInstructions.go (about)

     1  package chmodhelpertests
     2  
     3  import (
     4  	"gitlab.com/evatix-go/core/chmodhelper"
     5  	"gitlab.com/evatix-go/core/errcore"
     6  	"gitlab.com/evatix-go/core/tests/testwrappers/chmodhelpertestwrappers"
     7  )
     8  
     9  func applyPathInstructions(
    10  	testCase *chmodhelpertestwrappers.RwxInstructionTestWrapper,
    11  ) error {
    12  	executors, err := chmodhelper.ParseRwxInstructionsToExecutors(
    13  		testCase.RwxInstructions)
    14  
    15  	errcore.SimpleHandleErr(err, "applyPathInstructions")
    16  
    17  	for _, createPath := range testCase.CreatePaths {
    18  		err2 := executors.ApplyOnPathsPtr(createPath.GetPathsPtr())
    19  
    20  		if err2 != nil {
    21  			return err2
    22  		}
    23  	}
    24  
    25  	return nil
    26  }