Documentation ¶
Index ¶
- func CopyDevfileSamples(t *testing.T, testDevfiles []string)
- func RunMultiThreadTest(testContent commonUtils.TestContent, t *testing.T)
- func RunMultiThreadedStaticTest(testContent commonUtils.TestContent, t *testing.T)
- func RunStaticTest(testContent commonUtils.TestContent, t *testing.T)
- func RunTest(testContent commonUtils.TestContent, t *testing.T)
- func SetParserArgs(args parser.ParserArgs)
- func UpdateCommand(devfile *commonUtils.TestDevfile, commandId string) error
- func UpdateComponent(devfile *commonUtils.TestDevfile, componentName string) error
- func UpdateProject(devfile *commonUtils.TestDevfile, projectName string) error
- func UpdateStarterProject(devfile *commonUtils.TestDevfile, projectName string) error
- func VerifyCommands(devfile *commonUtils.TestDevfile, parserCommands []schema.Command) error
- func VerifyComponents(devfile *commonUtils.TestDevfile, parserComponents []schema.Component) error
- func VerifyProjects(devfile *commonUtils.TestDevfile, parserProjects []schema.Project) error
- func VerifyStarterProjects(devfile *commonUtils.TestDevfile, ...) error
- type DevfileFollower
- func (devfileFollower DevfileFollower) AddCommand(command schema.Command) error
- func (devfileFollower DevfileFollower) AddComponent(component schema.Component) error
- func (devfileFollower DevfileFollower) AddEvent(event schema.Events) error
- func (devfileFollower DevfileFollower) AddProject(project schema.Project) error
- func (devfileFollower DevfileFollower) AddStarterProject(starterProject schema.StarterProject) error
- func (devfileFollower DevfileFollower) SetMetaData(metaData header.DevfileMetadata) error
- func (devfileFollower DevfileFollower) SetParent(parent schema.Parent) error
- func (devfileFollower DevfileFollower) SetSchemaVersion(schemaVersion string)
- func (devfileFollower DevfileFollower) UpdateCommand(command schema.Command)
- func (devfileFollower DevfileFollower) UpdateComponent(component schema.Component)
- func (devfileFollower DevfileFollower) UpdateEvent(event schema.Events)
- func (devfileFollower DevfileFollower) UpdateMetaData(updateMetaData header.DevfileMetadata)
- func (devfileFollower DevfileFollower) UpdateParent(parent schema.Parent)
- func (devfileFollower DevfileFollower) UpdateProject(project schema.Project)
- func (devfileFollower DevfileFollower) UpdateStarterProject(starterProject schema.StarterProject)
- type DevfileValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDevfileSamples ¶ added in v1.1.0
CopyDevfileSamples : Copies existing artifacts from the devfiles/samples directory to the tmp/library_test directory. Used in parent tests
func RunMultiThreadTest ¶
func RunMultiThreadTest(testContent commonUtils.TestContent, t *testing.T)
RunMultiThreadTest : Runs the same test on multiple threads, the test is based on the content of the specified TestContent
func RunMultiThreadedStaticTest ¶ added in v1.3.0
func RunMultiThreadedStaticTest(testContent commonUtils.TestContent, t *testing.T)
RunMultiThreadedStaticTest : Runs the same test on multiple threads, the test is based on the content of the specified TestContent
func RunStaticTest ¶ added in v1.3.0
func RunStaticTest(testContent commonUtils.TestContent, t *testing.T)
RunStaticTest : Runs fixed tests based on pre-existing artifacts
func RunTest ¶
func RunTest(testContent commonUtils.TestContent, t *testing.T)
RunTest : Runs a test to create and verify a devfile based on the content of the specified TestContent
func SetParserArgs ¶ added in v1.1.0
func SetParserArgs(args parser.ParserArgs)
SetParserArgs : Used when parser args other than filename are set in the library tests
func UpdateCommand ¶
func UpdateCommand(devfile *commonUtils.TestDevfile, commandId string) error
UpdateCommand randomly updates attribute values of a specified command in the devfile schema
func UpdateComponent ¶
func UpdateComponent(devfile *commonUtils.TestDevfile, componentName string) error
UpdateComponent randomly updates the attribute values of a specified component
func UpdateProject ¶
func UpdateProject(devfile *commonUtils.TestDevfile, projectName string) error
UpdateProject randomly modifies an existing project
func UpdateStarterProject ¶
func UpdateStarterProject(devfile *commonUtils.TestDevfile, projectName string) error
UpdateStarterProject randomly modifies an existing starter project
func VerifyCommands ¶
func VerifyCommands(devfile *commonUtils.TestDevfile, parserCommands []schema.Command) error
VerifyCommands verifies commands returned by the parser are the same as those saved in the devfile schema
func VerifyComponents ¶
func VerifyComponents(devfile *commonUtils.TestDevfile, parserComponents []schema.Component) error
VerifyComponents verifies components returned by the parser are the same as those saved in the devfile schema
func VerifyProjects ¶
func VerifyProjects(devfile *commonUtils.TestDevfile, parserProjects []schema.Project) error
VerifyProjects verifies projects returned by the parser are the same as those saved in the devfile schema
func VerifyStarterProjects ¶
func VerifyStarterProjects(devfile *commonUtils.TestDevfile, parserStarterProjects []schema.StarterProject) error
VerifyStarterProjects verifies starter projects returned by the parser are the same as those saved in the devfile schema
Types ¶
type DevfileFollower ¶
type DevfileFollower struct {
LibraryData devfileData.DevfileData
}
DevfileFollower struct for DevfileFollower interface. The DevfileFollower interface is defined in test/v200/utils/common/test_utils.go of the devfile/api repository
func (DevfileFollower) AddCommand ¶
func (devfileFollower DevfileFollower) AddCommand(command schema.Command) error
AddCommand adds the specified command to the library data
func (DevfileFollower) AddComponent ¶
func (devfileFollower DevfileFollower) AddComponent(component schema.Component) error
AddComponent adds the specified component to the library data
func (DevfileFollower) AddEvent ¶
func (devfileFollower DevfileFollower) AddEvent(event schema.Events) error
AddEvent adds the specified event to the library data
func (DevfileFollower) AddProject ¶
func (devfileFollower DevfileFollower) AddProject(project schema.Project) error
AddProject adds the specified project to the library data
func (DevfileFollower) AddStarterProject ¶
func (devfileFollower DevfileFollower) AddStarterProject(starterProject schema.StarterProject) error
AddStarterProject adds the specified starter project to the library data
func (DevfileFollower) SetMetaData ¶
func (devfileFollower DevfileFollower) SetMetaData(metaData header.DevfileMetadata) error
SetMetaData sets the specified metaData in the library data
func (DevfileFollower) SetParent ¶
func (devfileFollower DevfileFollower) SetParent(parent schema.Parent) error
SetParent sets the specified parent in the library data
func (DevfileFollower) SetSchemaVersion ¶
func (devfileFollower DevfileFollower) SetSchemaVersion(schemaVersion string)
SetSchemaVersion sets the specified schemaVersion in the library data
func (DevfileFollower) UpdateCommand ¶
func (devfileFollower DevfileFollower) UpdateCommand(command schema.Command)
UpdateCommand updates the specified command in the library data
func (DevfileFollower) UpdateComponent ¶
func (devfileFollower DevfileFollower) UpdateComponent(component schema.Component)
UpdateComponent updates the specified component in the library data
func (DevfileFollower) UpdateEvent ¶
func (devfileFollower DevfileFollower) UpdateEvent(event schema.Events)
UpdateEvent updates the specified event in the library data
func (DevfileFollower) UpdateMetaData ¶
func (devfileFollower DevfileFollower) UpdateMetaData(updateMetaData header.DevfileMetadata)
UpdateMetaData updates the specified UpdateMetaData in the library data
func (DevfileFollower) UpdateParent ¶
func (devfileFollower DevfileFollower) UpdateParent(parent schema.Parent)
UpdateParent updates the specified parent in the library data
func (DevfileFollower) UpdateProject ¶
func (devfileFollower DevfileFollower) UpdateProject(project schema.Project)
UpdateProject updates the specified project in the library data
func (DevfileFollower) UpdateStarterProject ¶
func (devfileFollower DevfileFollower) UpdateStarterProject(starterProject schema.StarterProject)
UpdateStarterProject updates the specified starter project in the library data
type DevfileValidator ¶
type DevfileValidator struct{}
DevfileValidator struct for DevfileValidator interface. The DevfileValidator interface is test/v200/utils/common/test_utils.go of the devfile/api repository.
func (DevfileValidator) WriteAndValidate ¶
func (devfileValidator DevfileValidator) WriteAndValidate(devfile *commonUtils.TestDevfile) error
WriteAndValidate implements DevfileValidator interface. writes to disk and validates the specified devfile