Commit a941c0d 1 parent 5151562 commit a941c0d Copy full SHA for a941c0d
File tree 2 files changed +6
-32
lines changed
2 files changed +6
-32
lines changed Original file line number Diff line number Diff line change 1
1
# Setup Development Environment
2
2
3
- ## Install the operator-sdk
4
-
5
- Follow the instructions on the [ Operator SDK website] ( https://sdk.operatorframework.io/docs/installation/install-operator-sdk/ )
6
- to check out and install the operator-sdk tools.
7
-
8
- ## Install openapi-gen
9
-
10
- Install the kube-api version of [ openapi-gen] ( https://github.com/kubernetes/kube-openapi )
11
-
12
- ``` bash
13
- go get k8s.io/kube-openapi/cmd/openapi-gen
14
- ```
15
-
16
3
## With minikube
17
4
18
5
1 . Install and launch minikube
@@ -25,7 +12,7 @@ go get k8s.io/kube-openapi/cmd/openapi-gen
25
12
kubectl create namespace metal3
26
13
```
27
14
28
- 1. Install operator-sdk
15
+ 1. Install operator in the cluster
29
16
30
17
` ` ` bash
31
18
eval $( go env)
@@ -39,15 +26,15 @@ go get k8s.io/kube-openapi/cmd/openapi-gen
39
26
kubectl apply -f deploy/crds/metal3.io_baremetalhosts_crd.yaml
40
27
` ` `
41
28
42
- 1. Launch the operator locally
29
+ 1. OR Launch the operator locally
43
30
44
31
` ` ` bash
45
32
export OPERATOR_NAME=baremetal-operator
46
33
export DEPLOY_KERNEL_URL=http://172.22.0.1/images/ironic-python-agent.kernel
47
34
export DEPLOY_RAMDISK_URL=http://172.22.0.1/images/ironic-python-agent.initramfs
48
35
export IRONIC_ENDPOINT=http://localhost:6385/v1/
49
36
export IRONIC_INSPECTOR_ENDPOINT=http://localhost:5050/v1
50
- operator-sdk run --local --watch-namespace=metal3
37
+ make run
51
38
` ` `
52
39
53
40
1. Create the CR
Original file line number Diff line number Diff line change 1
- # Running end-to-end- tests
1
+ # Running the tests
2
2
3
3
## Setup
4
4
@@ -10,22 +10,9 @@ create CRDs. An example role binding setting for configuring the
10
10
oc --as system:admin apply -f test/e2e/role_binding.yaml
11
11
```
12
12
13
- ### Run the e2e tests
13
+ ### Run the unit tests
14
14
15
- Run the tests using the operator-sdk command line tool
16
-
17
- ``` bash
18
- operator-sdk test local ./test/e2e --namespace operator-test --up-local --debug
19
- ```
20
-
21
- If the setup steps above have already been run, causing "X already
22
- exists" errors, use the --no-setup option to skip that step in the test.
23
-
24
- ``` bash
25
- operator-sdk test local ./test/e2e --namespace operator-test --up-local --debug --no-setup
26
- ```
27
-
28
- The tests can also be run via ` make `
15
+ The tests can be run via ` make `
29
16
30
17
``` bash
31
18
make test
You can’t perform that action at this time.
0 commit comments