Fix e2e tests
This commit is contained in:
		
							parent
							
								
									9a88f45efe
								
							
						
					
					
						commit
						f7b6443fc6
					
				|  | @ -135,7 +135,9 @@ type Container struct { | |||
| 
 | ||||
| // Plugin defines Jenkins plugin
 | ||||
| type Plugin struct { | ||||
| 	Name    string `json:"name"` | ||||
| 	// Name is the name of Jenkins plugin
 | ||||
| 	Name string `json:"name"` | ||||
| 	// Version is the version of Jenkins plugin
 | ||||
| 	Version string `json:"version"` | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -4,6 +4,7 @@ | |||
| package v1alpha2 | ||||
| 
 | ||||
| import ( | ||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	"k8s.io/apimachinery/pkg/runtime/schema" | ||||
| 	"sigs.k8s.io/controller-runtime/pkg/runtime/scheme" | ||||
| ) | ||||
|  | @ -36,6 +37,13 @@ func (in *Jenkins) GroupVersionKind() schema.GroupVersionKind { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| func JenkinsTypeMeta() metav1.TypeMeta { | ||||
| 	return metav1.TypeMeta{ | ||||
| 		Kind:       Kind, | ||||
| 		APIVersion: SchemeGroupVersion.String(), | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(&Jenkins{}, &JenkinsList{}) | ||||
| } | ||||
|  |  | |||
|  | @ -67,6 +67,7 @@ func createJenkinsCR(t *testing.T, name, namespace string, seedJob *[]v1alpha2.S | |||
| 	} | ||||
| 
 | ||||
| 	jenkins := &v1alpha2.Jenkins{ | ||||
| 		TypeMeta: v1alpha2.JenkinsTypeMeta(), | ||||
| 		ObjectMeta: metav1.ObjectMeta{ | ||||
| 			Name:      name, | ||||
| 			Namespace: namespace, | ||||
|  |  | |||
|  | @ -72,6 +72,7 @@ func createPVC(t *testing.T, namespace string) { | |||
| func createJenkinsWithBackupAndRestoreConfigured(t *testing.T, name, namespace string) *v1alpha2.Jenkins { | ||||
| 	containerName := "backup" | ||||
| 	jenkins := &v1alpha2.Jenkins{ | ||||
| 		TypeMeta: v1alpha2.JenkinsTypeMeta(), | ||||
| 		ObjectMeta: metav1.ObjectMeta{ | ||||
| 			Name:      name, | ||||
| 			Namespace: namespace, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue