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

Function generateDummyExecCommand

pkg/validation/commands_test.go:33–49  ·  view source on GitHub ↗

generateDummyExecCommand returns a dummy exec command for testing

(name, component string, group *v1alpha2.CommandGroup)

Source from the content-addressed store, hash-verified

31
32// generateDummyExecCommand returns a dummy exec command for testing
33func generateDummyExecCommand(name, component string, group *v1alpha2.CommandGroup) v1alpha2.Command {
34 return v1alpha2.Command{
35 Id: name,
36 CommandUnion: v1alpha2.CommandUnion{
37 Exec: &v1alpha2.ExecCommand{
38 LabeledCommand: v1alpha2.LabeledCommand{
39 BaseCommand: v1alpha2.BaseCommand{
40 Group: group,
41 },
42 },
43 CommandLine: "command",
44 Component: component,
45 WorkingDir: "workDir",
46 },
47 },
48 }
49}
50
51// generateDummyExecCommand returns a dummy apply command for testing
52func generateDummyApplyCommand(name, component string, group *v1alpha2.CommandGroup, cmdAttributes attributes.Attributes) v1alpha2.Command {

Callers 6

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

Calls

no outgoing calls

Tested by

no test coverage detected