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

Method SetProjectValues

test/v200/utils/common/project_test_utils.go:150–164  ·  view source on GitHub ↗

SetProjectValues sets project attributes, common to all projects, to random values.

(project *schema.Project)

Source from the content-addressed store, hash-verified

148
149// SetProjectValues sets project attributes, common to all projects, to random values.
150func (testDevfile *TestDevfile) SetProjectValues(project *schema.Project) {
151
152 if GetBinaryDecision() {
153 project.ClonePath = "./" + GetRandomString(GetRandomNumber(4, 12), false)
154 LogInfoMessage(fmt.Sprintf("Set ClonePath : %s", project.ClonePath))
155 }
156
157 if project.Git != nil {
158 setGitProjectValues(project.Git)
159 } else if project.Zip != nil {
160 setZipProjectValues(project.Zip)
161 }
162
163 testDevfile.projectUpdated(*project)
164}
165
166// SetStarterProjectValues sets starter project attributes, common to all starter projects, to random values.
167func (testDevfile *TestDevfile) SetStarterProjectValues(starterProject *schema.StarterProject) {

Callers 1

AddProjectMethod · 0.95

Calls 7

projectUpdatedMethod · 0.95
GetBinaryDecisionFunction · 0.85
GetRandomStringFunction · 0.85
GetRandomNumberFunction · 0.85
LogInfoMessageFunction · 0.85
setGitProjectValuesFunction · 0.85
setZipProjectValuesFunction · 0.85

Tested by

no test coverage detected