github.imxd.top/gopinath-langote/1build@v1.2.0/testing/fixtures/fixures.go (about)

     1  package fixtures
     2  
     3  import "testing"
     4  
     5  type Setup func(dir string) error
     6  type Assertion func(dir string, actualOutput string, t *testing.T) bool
     7  type Teardown func(dir string) error
     8  
     9  type Test struct {
    10  	Feature   string
    11  	Name      string
    12  	CmdArgs   []string
    13  	Setup     Setup
    14  	Assertion Assertion
    15  	Teardown  Teardown
    16  }
    17  
    18  func GetFixtures() []Test {
    19  
    20  	routes := [][]Test{
    21  		FeatureRootTestData(),
    22  		FeatureExecuteCmdTestData(),
    23  
    24  		FeatureInitTestsData(),
    25  		FeatureListTestData(),
    26  		FeatureSetTestsData(),
    27  		FeatureUnsetTestsData(),
    28  
    29  		FeatureFlagVersionTestData(),
    30  	}
    31  
    32  	var r1 []Test
    33  	for _, r := range routes {
    34  		r1 = append(r1, r...)
    35  	}
    36  	return r1
    37  }