File tree Expand file tree Collapse file tree 2 files changed +28
-18
lines changed
commands/operator-sdk/cmd/scorecard
test/test-framework/deploy Expand file tree Collapse file tree 2 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
25
25
26
26
// Struct definitions
27
27
28
+ // ScorecardVars contains all necessary variables for running scorecard tests
28
29
type ScorecardVars struct {
29
30
client * client.Client
30
31
crObj * unstructured.Unstructured
@@ -34,13 +35,14 @@ type ScorecardVars struct {
34
35
retryInterval int
35
36
}
36
37
38
+ // Score contains the number of earned points and maximum number of points
37
39
type Score struct {
38
40
earnedPoints int
39
41
maximumPoints int
40
42
}
41
43
44
+ // Test defines a scorecard test
42
45
type Test struct {
43
- testType string
44
46
name string
45
47
description string
46
48
// by having an array of scores, we can more easily add support for multiple CR
@@ -50,6 +52,7 @@ type Test struct {
50
52
run func (* Test , ScorecardVars ) error
51
53
}
52
54
55
+ // TestSuite defines a suite of scorecard tests
53
56
type TestSuite struct {
54
57
name string
55
58
description string
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ apiVersion: v1
2
2
kind : ServiceAccount
3
3
metadata :
4
4
name : memcached-operator
5
+
5
6
---
6
7
apiVersion : rbac.authorization.k8s.io/v1
7
8
kind : Role
36
37
- ' *'
37
38
verbs :
38
39
- ' *'
40
+
39
41
---
40
42
kind : RoleBinding
41
43
apiVersion : rbac.authorization.k8s.io/v1
@@ -48,36 +50,41 @@ roleRef:
48
50
kind : Role
49
51
name : memcached-operator
50
52
apiGroup : rbac.authorization.k8s.io
53
+
51
54
---
52
55
apiVersion : apps/v1
53
56
kind : Deployment
54
57
metadata :
58
+ creationTimestamp : null
55
59
name : memcached-operator
56
60
spec :
57
61
replicas : 1
58
62
selector :
59
63
matchLabels :
60
64
name : memcached-operator
65
+ strategy : {}
61
66
template :
62
67
metadata :
68
+ creationTimestamp : null
63
69
labels :
64
70
name : memcached-operator
65
71
spec :
66
- serviceAccountName : memcached-operator
67
72
containers :
68
- - name : memcached-operator
69
- # Replace this with the built image name
70
- image : quay.io/coreos/operator-sdk-dev:test-framework-operator-runtime
71
- ports :
72
- - containerPort : 60000
73
- name : metrics
74
- command :
75
- - memcached-operator
76
- imagePullPolicy : Always
77
- env :
78
- - name : WATCH_NAMESPACE
79
- valueFrom :
80
- fieldRef :
81
- fieldPath : metadata.namespace
82
- - name : OPERATOR_NAME
83
- value : " memcached-operator"
73
+ - command :
74
+ - memcached-operator
75
+ env :
76
+ - name : WATCH_NAMESPACE
77
+ valueFrom :
78
+ fieldRef :
79
+ fieldPath : metadata.namespace
80
+ - name : OPERATOR_NAME
81
+ value : memcached-operator
82
+ image : quay.io/coreos/operator-sdk-dev:test-framework-operator-runtime
83
+ imagePullPolicy : Always
84
+ name : memcached-operator
85
+ ports :
86
+ - containerPort : 60000
87
+ name : metrics
88
+ resources : {}
89
+ serviceAccountName : memcached-operator
90
+ status : {}
You can’t perform that action at this time.
0 commit comments