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

Function generateDummyApplyCommand

pkg/validation/commands_test.go:52–67  ·  view source on GitHub ↗

generateDummyExecCommand returns a dummy apply command for testing

(name, component string, group *v1alpha2.CommandGroup, cmdAttributes attributes.Attributes)

Source from the content-addressed store, hash-verified

50
51// generateDummyExecCommand returns a dummy apply command for testing
52func generateDummyApplyCommand(name, component string, group *v1alpha2.CommandGroup, cmdAttributes attributes.Attributes) v1alpha2.Command {
53 return v1alpha2.Command{
54 Attributes: cmdAttributes,
55 Id: name,
56 CommandUnion: v1alpha2.CommandUnion{
57 Apply: &v1alpha2.ApplyCommand{
58 LabeledCommand: v1alpha2.LabeledCommand{
59 BaseCommand: v1alpha2.BaseCommand{
60 Group: group,
61 },
62 },
63 Component: component,
64 },
65 },
66 }
67}
68
69// generateDummyCompositeCommand returns a dummy composite command for testing
70func generateDummyCompositeCommand(name string, commands []string, group *v1alpha2.CommandGroup) v1alpha2.Command {

Callers 5

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

Calls

no outgoing calls

Tested by

no test coverage detected