Skip to content

Commit b6c3c89

Browse files
authored
.travis.yaml: enable test-framework tests (#474)
1 parent 384f13c commit b6c3c89

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ script:
3535
- make install
3636
- go test ./pkg/...
3737
- go test ./test/e2e/...
38+
- cd test/test-framework
39+
# test framework with defaults
40+
- operator-sdk test -t .
41+
# test operator-sdk test flags
42+
- operator-sdk test -t . -g deploy/crd.yaml -n deploy/namespace-init.yaml -f "-parallel 1" -k $HOME/.kube/config
43+
# go back to project root
44+
- cd ../..
3845
- go vet ./...
3946
- ./hack/check_license.sh
4047
- ./hack/check_error_case.sh
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
kind: Role
2+
apiVersion: rbac.authorization.k8s.io/v1beta1
3+
metadata:
4+
name: memcached-operator
5+
rules:
6+
- apiGroups:
7+
- cache.example.com
8+
resources:
9+
- "*"
10+
verbs:
11+
- "*"
12+
- apiGroups:
13+
- ""
14+
resources:
15+
- pods
16+
- services
17+
- endpoints
18+
- persistentvolumeclaims
19+
- events
20+
- configmaps
21+
- secrets
22+
verbs:
23+
- "*"
24+
- apiGroups:
25+
- apps
26+
resources:
27+
- deployments
28+
- daemonsets
29+
- replicasets
30+
- statefulsets
31+
verbs:
32+
- "*"
33+
34+
---
35+
36+
kind: RoleBinding
37+
apiVersion: rbac.authorization.k8s.io/v1beta1
38+
metadata:
39+
name: default-account-memcached-operator
40+
subjects:
41+
- kind: ServiceAccount
42+
name: default
43+
roleRef:
44+
kind: Role
45+
name: memcached-operator
46+
apiGroup: rbac.authorization.k8s.io
47+
48+
---
49+
50+
apiVersion: apps/v1
51+
kind: Deployment
52+
metadata:
53+
name: memcached-operator
54+
spec:
55+
replicas: 1
56+
selector:
57+
matchLabels:
58+
name: memcached-operator
59+
template:
60+
metadata:
61+
labels:
62+
name: memcached-operator
63+
spec:
64+
containers:
65+
- name: memcached-operator
66+
image: quay.io/coreos/operator-sdk-dev:test-framework-operator
67+
ports:
68+
- containerPort: 60000
69+
name: metrics
70+
command:
71+
- memcached-operator
72+
imagePullPolicy: Always
73+
env:
74+
- name: WATCH_NAMESPACE
75+
valueFrom:
76+
fieldRef:
77+
fieldPath: metadata.namespace
78+
- name: OPERATOR_NAME
79+
value: "memcached-operator"

0 commit comments

Comments
 (0)