...

Source file src/github.com/redhat-developer/odo/pkg/testingutil/projects.go

Documentation: github.com/redhat-developer/odo/pkg/testingutil

     1  package testingutil
     2  
     3  import (
     4  	v1 "github.com/openshift/api/project/v1"
     5  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
     6  )
     7  
     8  func getFakeProject(projectName string) v1.Project {
     9  	return v1.Project{
    10  		ObjectMeta: metav1.ObjectMeta{
    11  			Name: projectName,
    12  		},
    13  	}
    14  }
    15  
    16  // FakeProjects returns fake projectlist for use by API mock functions for Unit tests
    17  func FakeProjects() *v1.ProjectList {
    18  	return &v1.ProjectList{
    19  		Items: []v1.Project{
    20  			getFakeProject("testing"),
    21  			getFakeProject("prj1"),
    22  			getFakeProject("prj2"),
    23  		},
    24  	}
    25  }
    26  

View as plain text