MCPcopy Create free account
hub / github.com/devfile/api / generateDummyCompositeCommand

Function generateDummyCompositeCommand

pkg/validation/commands_test.go:70–84  ·  view source on GitHub ↗

generateDummyCompositeCommand returns a dummy composite command for testing

(name string, commands []string, group *v1alpha2.CommandGroup)

Source from the content-addressed store, hash-verified

68
69// generateDummyCompositeCommand returns a dummy composite command for testing
70func generateDummyCompositeCommand(name string, commands []string, group *v1alpha2.CommandGroup) v1alpha2.Command {
71 return v1alpha2.Command{
72 Id: name,
73 CommandUnion: v1alpha2.CommandUnion{
74 Composite: &v1alpha2.CompositeCommand{
75 LabeledCommand: v1alpha2.LabeledCommand{
76 BaseCommand: v1alpha2.BaseCommand{
77 Group: group,
78 },
79 },
80 Commands: commands,
81 },
82 },
83 }
84}
85
86func TestValidateCommands(t *testing.T) {
87

Callers 5

TestValidateCommandsFunction · 0.85
TestValidateGroupFunction · 0.85
TestValidateEventsFunction · 0.85
TestIsEventValidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected