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

Method createStarterProject

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

createStarterProject creates a starter project of a specified type with only required attributes set

(projectType schema.ProjectSourceType)

Source from the content-addressed store, hash-verified

119
120// createStarterProject creates a starter project of a specified type with only required attributes set
121func (testDevfile *TestDevfile) createStarterProject(projectType schema.ProjectSourceType) schema.StarterProject {
122 starterProject := schema.StarterProject{}
123 starterProject.Name = GetRandomUniqueString(GetRandomNumber(8, 63), true)
124 LogInfoMessage(fmt.Sprintf("Create StarterProject Name: %s", starterProject.Name))
125
126 if projectType == schema.GitProjectSourceType {
127 starterProject.Git = createGitProject(1)
128 } else if projectType == schema.ZipProjectSourceType {
129 starterProject.Zip = createZipProject()
130 }
131 testDevfile.starterProjectAdded(starterProject)
132 return starterProject
133
134}
135
136// createGitProject creates a git project structure with mandatory attributes set
137func createGitProject(numRemotes int) *schema.GitProjectSource {

Callers 1

AddStarterProjectMethod · 0.95

Calls 6

starterProjectAddedMethod · 0.95
GetRandomUniqueStringFunction · 0.85
GetRandomNumberFunction · 0.85
LogInfoMessageFunction · 0.85
createGitProjectFunction · 0.85
createZipProjectFunction · 0.85

Tested by

no test coverage detected