MCPcopy Create free account
hub / github.com/apache/camel-k / initializeRunCmdOptionsWithOutput

Function initializeRunCmdOptionsWithOutput

pkg/cmd/run_test.go:66–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

64}
65
66func initializeRunCmdOptionsWithOutput(t *testing.T) (*runCmdOptions, *cobra.Command, RootCmdOptions) {
67 t.Helper()
68 c := v1.NewCamelCatalog("default", defaults.DefaultRuntimeVersion)
69 c.Spec = v1.CamelCatalogSpec{Runtime: v1.RuntimeSpec{Provider: v1.RuntimeProviderPlainQuarkus, Version: defaults.DefaultRuntimeVersion}}
70 fakeClient, _ := internal.NewFakeClient(&c)
71
72 options, rootCmd := kamelTestPreAddCommandInitWithClient(fakeClient)
73 runCmdOptions := addTestRunCmdWithOutput(*options, rootCmd)
74 kamelTestPostAddCommandInit(t, rootCmd, options)
75
76 return runCmdOptions, rootCmd, *options
77}
78
79func addTestRunCmd(options RootCmdOptions, rootCmd *cobra.Command) *runCmdOptions {
80 // add a testing version of run Command

Callers 15

TestAddPropertyFileFunction · 0.85
TestRunPropertyFunction · 0.85
TestOutputYamlFunction · 0.85
TestTraitFunction · 0.85
TestMissingTraitFunction · 0.85
TestFilePropertiesFunction · 0.85
TestRunOutputFunction · 0.85

Calls 5

NewCamelCatalogFunction · 0.92
NewFakeClientFunction · 0.92
addTestRunCmdWithOutputFunction · 0.85

Tested by

no test coverage detected