From e8389d2343b391e4aa2d5469bebdf0266e91caa2 Mon Sep 17 00:00:00 2001 From: Martin Mulholland Date: Fri, 5 Mar 2021 16:31:27 -0500 Subject: [PATCH 1/3] add projects and starter projects to library tests --- go.mod | 2 +- go.sum | 4 +- tests/README.md | 2 + tests/v2/libraryTest/library_test.go | 22 +++ tests/v2/utils/library/project_test_utils.go | 192 +++++++++++++++++++ tests/v2/utils/library/test_utils.go | 68 ++++++- 6 files changed, 283 insertions(+), 7 deletions(-) create mode 100644 tests/v2/utils/library/project_test_utils.go diff --git a/go.mod b/go.mod index 8f010c86..bcdaec94 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/devfile/library go 1.13 require ( - github.com/devfile/api/v2 v2.0.0-20210223145532-81859eaef987 + github.com/devfile/api/v2 v2.0.0-20210304212617-bfc3f501616b github.com/fatih/color v1.7.0 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/gobwas/glob v0.2.3 diff --git a/go.sum b/go.sum index 252c1324..83fb2758 100644 --- a/go.sum +++ b/go.sum @@ -44,8 +44,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devfile/api/v2 v2.0.0-20210223145532-81859eaef987 h1:3wclWpWL/+IP6oAMY1M+RECQYa/4ZBkff7jDX1RyLxg= -github.com/devfile/api/v2 v2.0.0-20210223145532-81859eaef987/go.mod h1:Cot4snybn3qhIh48oIFi9McocnIx7zY5fFbjfrIpPvg= +github.com/devfile/api/v2 v2.0.0-20210304212617-bfc3f501616b h1:r6Z2rXRA60eQQTdh1cJBBrj3vp9/c1rNbX42kyw2WpA= +github.com/devfile/api/v2 v2.0.0-20210304212617-bfc3f501616b/go.mod h1:Cot4snybn3qhIh48oIFi9McocnIx7zY5fFbjfrIpPvg= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= diff --git a/tests/README.md b/tests/README.md index abbdc69d..ceefd6a5 100644 --- a/tests/README.md +++ b/tests/README.md @@ -29,6 +29,8 @@ The tests which generate devfiles with random content at run time currently cove * Components * Container * Volume +* Projects +* Starter Projects ## Test structure diff --git a/tests/v2/libraryTest/library_test.go b/tests/v2/libraryTest/library_test.go index 7dc6deab..bdb2744d 100644 --- a/tests/v2/libraryTest/library_test.go +++ b/tests/v2/libraryTest/library_test.go @@ -124,12 +124,34 @@ func Test_MultiComponent(t *testing.T) { libraryUtils.RunMultiThreadTest(testContent, t) } +func Test_Projects(t *testing.T) { + testContent := commonUtils.TestContent{} + testContent.ProjectTypes = []schema.ProjectSourceType{schema.GitProjectSourceType, schema.ZipProjectSourceType} + testContent.EditContent = true + testContent.FileName = commonUtils.GetDevFileName() + libraryUtils.RunTest(testContent, t) + testContent.EditContent = true + libraryUtils.RunMultiThreadTest(testContent, t) +} + +func Test_StarterProjects(t *testing.T) { + testContent := commonUtils.TestContent{} + testContent.StarterProjectTypes = []schema.ProjectSourceType{schema.GitProjectSourceType, schema.ZipProjectSourceType} + testContent.EditContent = true + testContent.FileName = commonUtils.GetDevFileName() + libraryUtils.RunTest(testContent, t) + libraryUtils.RunMultiThreadTest(testContent, t) +} + func Test_Everything(t *testing.T) { testContent := commonUtils.TestContent{} testContent.CommandTypes = []schema.CommandType{schema.ExecCommandType, schema.CompositeCommandType, schema.ApplyCommandType} testContent.ComponentTypes = []schema.ComponentType{schema.ContainerComponentType, schema.VolumeComponentType} + testContent.ProjectTypes = []schema.ProjectSourceType{schema.GitProjectSourceType, schema.ZipProjectSourceType} + testContent.StarterProjectTypes = []schema.ProjectSourceType{schema.GitProjectSourceType, schema.ZipProjectSourceType} testContent.EditContent = true testContent.FileName = commonUtils.GetDevFileName() libraryUtils.RunTest(testContent, t) libraryUtils.RunMultiThreadTest(testContent, t) + } diff --git a/tests/v2/utils/library/project_test_utils.go b/tests/v2/utils/library/project_test_utils.go new file mode 100644 index 00000000..799d751b --- /dev/null +++ b/tests/v2/utils/library/project_test_utils.go @@ -0,0 +1,192 @@ +package utils + +import ( + "errors" + "fmt" + "io/ioutil" + + "github.com/google/go-cmp/cmp" + "sigs.k8s.io/yaml" + + schema "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + commonUtils "github.com/devfile/api/v2/test/v200/utils/common" +) + +// getSchemaProject gets a named Project from the saved devfile schema structure +func getSchemaProject(projects []schema.Project, name string) (*schema.Project, bool) { + found := false + var schemaProject schema.Project + for _, project := range projects { + if project.Name == name { + schemaProject = project + found = true + break + } + } + return &schemaProject, found +} + +// getSchemaStarterProject gets a named Starter Project from the saved devfile schema structure +func getSchemaStarterProject(starterProjects []schema.StarterProject, name string) (*schema.StarterProject, bool) { + found := false + var schemaStarterProject schema.StarterProject + for _, starterProject := range starterProjects { + if starterProject.Name == name { + schemaStarterProject = starterProject + found = true + break + } + } + return &schemaStarterProject, found +} + +// UpdateProject randomly modifies an existing project +func UpdateProject(devfile *commonUtils.TestDevfile, projectName string) error { + + var err error + testProject, found := getSchemaProject(devfile.SchemaDevFile.Projects, projectName) + if found { + commonUtils.LogInfoMessage(fmt.Sprintf("Updating Project : %s", projectName)) + devfile.SetProjectValues(testProject) + } else { + err = errors.New(commonUtils.LogErrorMessage(fmt.Sprintf("Project not found in test : %s", projectName))) + } + return err + +} + +// UpdateStarterProject randomly modifies an existing starter project +func UpdateStarterProject(devfile *commonUtils.TestDevfile, projectName string) error { + + var err error + testStarterProject, found := getSchemaStarterProject(devfile.SchemaDevFile.StarterProjects, projectName) + if found { + commonUtils.LogInfoMessage(fmt.Sprintf("Updating Starter Project : %s", projectName)) + devfile.SetStarterProjectValues(testStarterProject) + } else { + err = errors.New(commonUtils.LogErrorMessage(fmt.Sprintf("Starter Project not found in test : %s", projectName))) + } + return err +} + +// VerifyProjects verifies projects returned by the parser are the same as those saved in the devfile schema +func VerifyProjects(devfile *commonUtils.TestDevfile, parserProjects []schema.Project) error { + + commonUtils.LogInfoMessage("Enter VerifyProjects") + var errorString []string + + // Compare entire array of projects + if !cmp.Equal(parserProjects, devfile.SchemaDevFile.Projects) { + // Compare failed so compare each project to find which one(s) don't compare + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Project array compare failed."))) + for _, project := range parserProjects { + if testProject, found := getSchemaProject(devfile.SchemaDevFile.Projects, project.Name); found { + if !cmp.Equal(project, *testProject) { + // Write out the failing project to a file, once as expected by the test, and a second as returned by the parser + parserFilename := commonUtils.AddSuffixToFileName(devfile.FileName, "_"+project.Name+"_Parser") + testFilename := commonUtils.AddSuffixToFileName(devfile.FileName, "_"+project.Name+"_Test") + commonUtils.LogInfoMessage(fmt.Sprintf(".......marshall and write devfile %s", parserFilename)) + c, err := yaml.Marshal(project) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", parserFilename))) + } else { + err = ioutil.WriteFile(parserFilename, c, 0644) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", parserFilename))) + } + } + commonUtils.LogInfoMessage(fmt.Sprintf(".......marshall and write devfile %s", testFilename)) + c, err = yaml.Marshal(testProject) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", testFilename))) + } else { + err = ioutil.WriteFile(testFilename, c, 0644) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", testFilename))) + } + } + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Project %s did not match, see files : %s and %s", project.Name, parserFilename, testFilename))) + } else { + commonUtils.LogInfoMessage(fmt.Sprintf(" --> Project matched : %s", project.Name)) + } + } else { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Project from parser not known to test - id : %s ", project.Name))) + } + } + // Check test does not include projects which the parser did not return + for _, project := range devfile.SchemaDevFile.Projects { + if _, found := getSchemaProject(parserProjects, project.Name); !found { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Project from test not returned by parser : %s ", project.Name))) + } + } + } else { + commonUtils.LogInfoMessage(fmt.Sprintf("Project structures matched")) + } + + var err error + if len(errorString) > 0 { + err = errors.New(fmt.Sprint(errorString)) + } + return err +} + +// VerifyStarterProjects verifies starter projects returned by the parser are the same as those saved in the devfile schema +func VerifyStarterProjects(devfile *commonUtils.TestDevfile, parserStarterProjects []schema.StarterProject) error { + + commonUtils.LogInfoMessage("Enter VerifyStarterProjects") + var errorString []string + + // Compare entire array of projects + if !cmp.Equal(parserStarterProjects, devfile.SchemaDevFile.StarterProjects) { + // Compare failed so compare each project to find which one(s) don't compare + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Starter Project array compare failed."))) + for _, starterProject := range parserStarterProjects { + if testStarterProject, found := getSchemaStarterProject(devfile.SchemaDevFile.StarterProjects, starterProject.Name); found { + if !cmp.Equal(starterProject, *testStarterProject) { + // Write out the failing starter project to a file, once as expected by the test, and a second as returned by the parser + parserFilename := commonUtils.AddSuffixToFileName(devfile.FileName, "_"+starterProject.Name+"_Parser") + testFilename := commonUtils.AddSuffixToFileName(devfile.FileName, "_"+starterProject.Name+"_Test") + commonUtils.LogInfoMessage(fmt.Sprintf(".......marshall and write devfile %s", parserFilename)) + c, err := yaml.Marshal(starterProject) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", parserFilename))) + } else { + err = ioutil.WriteFile(parserFilename, c, 0644) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", parserFilename))) + } + } + commonUtils.LogInfoMessage(fmt.Sprintf(".......marshall and write devfile %s", testFilename)) + c, err = yaml.Marshal(testStarterProject) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......marshall devfile %s", testFilename))) + } else { + err = ioutil.WriteFile(testFilename, c, 0644) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf(".......write devfile %s", testFilename))) + } + } + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Starter Project %s did not match, see files : %s and %s", starterProject.Name, parserFilename, testFilename))) + } else { + commonUtils.LogInfoMessage(fmt.Sprintf(" --> Starter Project matched : %s", starterProject.Name)) + } + } else { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Starter Project from parser not known to test - id : %s ", starterProject.Name))) + } + } + // Check test does not include projects which the parser did not return + for _, starterProject := range devfile.SchemaDevFile.StarterProjects { + if _, found := getSchemaStarterProject(parserStarterProjects, starterProject.Name); !found { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Starter Project from test not returned by parser : %s ", starterProject.Name))) + } + } + } else { + commonUtils.LogInfoMessage(fmt.Sprintf("Starter Project structures matched")) + } + + var err error + if len(errorString) > 0 { + err = errors.New(fmt.Sprint(errorString)) + } + return err +} diff --git a/tests/v2/utils/library/test_utils.go b/tests/v2/utils/library/test_utils.go index c5262ad5..33711de6 100644 --- a/tests/v2/utils/library/test_utils.go +++ b/tests/v2/utils/library/test_utils.go @@ -299,37 +299,97 @@ func verify(devfile *commonUtils.TestDevfile) error { // editCommands modifies random attributes for each of the commands in the devfile. func editCommands(devfile *commonUtils.TestDevfile) error { + var errorString []string commonUtils.LogInfoMessage(fmt.Sprintf("Edit %s : ", devfile.FileName)) commonUtils.LogInfoMessage(fmt.Sprintf(" -> Get commands %s : ", devfile.FileName)) commands, err := devfile.Follower.(DevfileFollower).LibraryData.GetCommands(common.DevfileOptions{}) if err != nil { - commonUtils.LogErrorMessage(fmt.Sprintf("Getting commands from library : %s : %v", devfile.FileName, err)) + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Getting commands from library : %s : %v", devfile.FileName, err))) + } else if len(commands) < 1 { + errorString = append(errorString, commonUtils.LogErrorMessage("Updating commands : No commands returned")) } else { for _, command := range commands { err = UpdateCommand(devfile, command.Id) if err != nil { - commonUtils.LogErrorMessage(fmt.Sprintf("Updating command : %s : %v", devfile.FileName, err)) + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Updating command : %s : %v", devfile.FileName, err))) } } } + if len(errorString) > 0 { + err = errors.New(fmt.Sprint(errorString)) + } return err } // editComponents modifies random attributes for each of the components in the devfile. func editComponents(devfile *commonUtils.TestDevfile) error { + var errorString []string commonUtils.LogInfoMessage(fmt.Sprintf("Edit %s : ", devfile.FileName)) commonUtils.LogInfoMessage(fmt.Sprintf(" -> Get components %s : ", devfile.FileName)) components, err := devfile.Follower.(DevfileFollower).LibraryData.GetComponents(common.DevfileOptions{}) if err != nil { - commonUtils.LogErrorMessage(fmt.Sprintf("Getting components from library : %s : %v", devfile.FileName, err)) + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Getting components from library : %s : %v", devfile.FileName, err))) + } else if len(components) < 1 { + errorString = append(errorString, commonUtils.LogErrorMessage("Updating components : No components returned")) } else { for _, component := range components { err = UpdateComponent(devfile, component.Name) if err != nil { - commonUtils.LogErrorMessage(fmt.Sprintf("Updating component : %s : %v", devfile.FileName, err)) + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Updating component : %s : %v", devfile.FileName, err))) + } + } + } + if len(errorString) > 0 { + err = errors.New(fmt.Sprint(errorString)) + } + return err +} + +// editProjects modifies random attributes for each of the projects in the devfile. +func editProjects(devfile *commonUtils.TestDevfile) error { + + var errorString []string + commonUtils.LogInfoMessage(fmt.Sprintf("Edit project %s : ", devfile.FileName)) + + commonUtils.LogInfoMessage(fmt.Sprintf(" -> Get projects %s : ", devfile.FileName)) + projects, err := devfile.Follower.(DevfileFollower).LibraryData.GetProjects(common.DevfileOptions{}) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Getting projects from library : %s : %v", devfile.FileName, err))) + } else if len(projects) < 1 { + errorString = append(errorString, commonUtils.LogErrorMessage("Updating projects : No projects returned")) + } else { + commonUtils.LogInfoMessage(fmt.Sprintf("Updating projects : %d projects found.", len(projects))) + for _, project := range projects { + err = UpdateProject(devfile, project.Name) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Updating project : %v", err))) + } + } + } + return err +} + +// editStarterProjects modifies random attributes for each of the starter projects in the devfile. +func editStarterProjects(devfile *commonUtils.TestDevfile) error { + + var errorString []string + commonUtils.LogInfoMessage(fmt.Sprintf("Edit starter project %s : ", devfile.FileName)) + + commonUtils.LogInfoMessage(fmt.Sprintf(" -> Get starter projects %s : ", devfile.FileName)) + starterProjects, err := devfile.Follower.(DevfileFollower).LibraryData.GetStarterProjects(common.DevfileOptions{}) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Getting starter projects from library : %s : %v", devfile.FileName, err))) + } else if len(starterProjects) < 1 { + errorString = append(errorString, commonUtils.LogErrorMessage("Updating starter projects : No starter projects returned")) + } else { + commonUtils.LogInfoMessage(fmt.Sprintf("Updating starter projects : %d starter projects found.", len(starterProjects))) + for _, starterProject := range starterProjects { + err = UpdateStarterProject(devfile, starterProject.Name) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Updating starter project : %v", err))) } } } From cb500362308566dbb3bde2e96deae080398e30d9 Mon Sep 17 00:00:00 2001 From: Martin Mulholland Date: Tue, 9 Mar 2021 16:55:52 -0500 Subject: [PATCH 2/3] Code review comments --- tests/v2/utils/library/test_utils.go | 46 ++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/tests/v2/utils/library/test_utils.go b/tests/v2/utils/library/test_utils.go index 33711de6..91d4a911 100644 --- a/tests/v2/utils/library/test_utils.go +++ b/tests/v2/utils/library/test_utils.go @@ -244,6 +244,18 @@ func RunTest(testContent commonUtils.TestContent, t *testing.T) { t.Fatalf(commonUtils.LogErrorMessage(fmt.Sprintf("ERROR editing components : %s : %v", testContent.FileName, err))) } } + if len(testContent.ProjectTypes) > 0 { + err = editProjects(&testDevfile) + if err != nil { + t.Fatalf(commonUtils.LogErrorMessage(fmt.Sprintf("ERROR editing projects : %s : %v", testContent.FileName, err))) + } + } + if len(testContent.StarterProjectTypes) > 0 { + err = editStarterProjects(&testDevfile) + if err != nil { + t.Fatalf(commonUtils.LogErrorMessage(fmt.Sprintf("ERROR editing starter projects : %s : %v", testContent.FileName, err))) + } + } validator.WriteAndValidate(&testDevfile) } @@ -266,7 +278,7 @@ func verify(devfile *commonUtils.TestDevfile) error { if commands != nil && len(commands) > 0 { err := VerifyCommands(devfile, commands) if err != nil { - errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Verfify Commands %s : %v", devfile.FileName, err))) + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Verify Commands %s : %v", devfile.FileName, err))) } } else { commonUtils.LogInfoMessage(fmt.Sprintf("No commands found in %s : ", devfile.FileName)) @@ -281,13 +293,43 @@ func verify(devfile *commonUtils.TestDevfile) error { if components != nil && len(components) > 0 { err := VerifyComponents(devfile, components) if err != nil { - errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Verfify Components %s : %v", devfile.FileName, err))) + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Verify Components %s : %v", devfile.FileName, err))) } } else { commonUtils.LogInfoMessage(fmt.Sprintf("No components found in %s : ", devfile.FileName)) } } + commonUtils.LogInfoMessage(fmt.Sprintf("Get projects %s : ", devfile.FileName)) + projects, err := libraryData.GetProjects(common.DevfileOptions{}) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Getting Projects from library : %s : %v", devfile.FileName, err))) + } else { + if projects != nil && len(projects) > 0 { + err := VerifyProjects(devfile, projects) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Verify Projects %s : %v", devfile.FileName, err))) + } + } else { + commonUtils.LogInfoMessage(fmt.Sprintf("No projects found in %s : ", devfile.FileName)) + } + } + + commonUtils.LogInfoMessage(fmt.Sprintf("Get projects %s : ", devfile.FileName)) + starterProjects, err := libraryData.GetStarterProjects(common.DevfileOptions{}) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Getting Starter Projects from library : %s : %v", devfile.FileName, err))) + } else { + if starterProjects != nil && len(starterProjects) > 0 { + err := VerifyStarterProjects(devfile, starterProjects) + if err != nil { + errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Verify Starter Projects %s : %v", devfile.FileName, err))) + } + } else { + commonUtils.LogInfoMessage(fmt.Sprintf("No starter projects found in %s : ", devfile.FileName)) + } + } + var returnError error if len(errorString) > 0 { returnError = errors.New(fmt.Sprint(errorString)) From b3cfa4102c58766f9ec0dc6c08ff39268976779f Mon Sep 17 00:00:00 2001 From: Martin Mulholland Date: Wed, 10 Mar 2021 13:29:42 -0500 Subject: [PATCH 3/3] More code review comments --- tests/v2/libraryTest/library_test.go | 1 - tests/v2/utils/library/test_utils.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/v2/libraryTest/library_test.go b/tests/v2/libraryTest/library_test.go index bdb2744d..87b6dc44 100644 --- a/tests/v2/libraryTest/library_test.go +++ b/tests/v2/libraryTest/library_test.go @@ -130,7 +130,6 @@ func Test_Projects(t *testing.T) { testContent.EditContent = true testContent.FileName = commonUtils.GetDevFileName() libraryUtils.RunTest(testContent, t) - testContent.EditContent = true libraryUtils.RunMultiThreadTest(testContent, t) } diff --git a/tests/v2/utils/library/test_utils.go b/tests/v2/utils/library/test_utils.go index 91d4a911..fac5574f 100644 --- a/tests/v2/utils/library/test_utils.go +++ b/tests/v2/utils/library/test_utils.go @@ -315,7 +315,7 @@ func verify(devfile *commonUtils.TestDevfile) error { } } - commonUtils.LogInfoMessage(fmt.Sprintf("Get projects %s : ", devfile.FileName)) + commonUtils.LogInfoMessage(fmt.Sprintf("Get starter projects %s : ", devfile.FileName)) starterProjects, err := libraryData.GetStarterProjects(common.DevfileOptions{}) if err != nil { errorString = append(errorString, commonUtils.LogErrorMessage(fmt.Sprintf("Getting Starter Projects from library : %s : %v", devfile.FileName, err)))