MCPcopy Index your code
hub / github.com/devfile/api / SetApplyCommandValues

Method SetApplyCommandValues

test/v200/utils/common/command_test_utils.go:231–246  ·  view source on GitHub ↗

SetApplyCommandValues randomly sets/updates apply command attributes to random values

(command *schema.Command)

Source from the content-addressed store, hash-verified

229
230// SetApplyCommandValues randomly sets/updates apply command attributes to random values
231func (testDevFile *TestDevfile) SetApplyCommandValues(command *schema.Command) {
232 applyCommand := command.Apply
233
234 applyCommand.Component = testDevFile.GetContainerName()
235
236 if GetRandomDecision(2, 1) {
237 applyCommand.Group = testDevFile.addGroup()
238 }
239
240 if GetBinaryDecision() {
241 applyCommand.Label = GetRandomString(63, false)
242 LogInfoMessage(fmt.Sprintf("....... label: %s", applyCommand.Label))
243 }
244
245 testDevFile.commandUpdated(*command)
246}

Callers 1

AddCommandMethod · 0.95

Calls 7

GetContainerNameMethod · 0.95
addGroupMethod · 0.95
commandUpdatedMethod · 0.95
GetRandomDecisionFunction · 0.85
GetBinaryDecisionFunction · 0.85
GetRandomStringFunction · 0.85
LogInfoMessageFunction · 0.85

Tested by

no test coverage detected