You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,7 @@ The steps are below:
58
58
4. Fix that until it works, if it didn't.
59
59
5. Run `vagrant forward-port 1389 389` to expose the vagrant VMs LDAP to the
60
60
host.
61
-
6. Start minikube with `minikube start
62
-
--extra-config=apiserver.enable-admission-plugins=PodSecurityPolicy`. It
61
+
6. Start minikube with `minikube start --kubernetes-version=1.15.5 --extra-config=apiserver.runtime-config=settings.k8s.io/v1alpha1=true --extra-config=apiserver.enable-admission-plugins=PodSecurityPolicy,PodPreset`. It
63
62
will fail to finish initializing because PodSecurityPolicy complicates
64
63
everything until the next step.
65
64
7. Run `kubectl apply -f <path to
@@ -92,13 +91,13 @@ The steps are below:
92
91
pod! After this, things become a bit more familiar in terms of python
93
92
testing.
94
93
17. Run `source venv/bin/activate`
95
-
18. Start recording tests! Delete the cassettes in the pod shell with `rm tests/cassettes` just to make sure you have a clean slate and run `pytest --in-k8s`. This will
94
+
18. Start recording tests! Delete the cassettes in the pod shell with `rm tests/cassettes/*` just to make sure you have a clean slate and run `pytest --in-k8s`. This will
96
95
**fail** on one of the API tests. The reason is that this doesn't have an
97
96
excellent teardown when actually running against an API server just yet.
98
97
It should have only failed on a single test.
99
98
19. In another terminal on your local machine run `kubectl delete ns
100
99
tool-blurp` to clean up what is upsetting that last test.
101
-
20. In your kubernetes pod terminal run `rm tests/cassettes/test_tool_renewal`. Now record only that test as a VCR cassette with `pytest --in-k8s -k "test_tool_renewal"`. If that succeeded, you have
100
+
20. In your kubernetes pod terminal run `rm tests/cassettes/test_tool_renewal.yaml`. Now record only that test as a VCR cassette with `pytest --in-k8s -k "test_tool_renewal"`. If that succeeded, you have
102
101
a good set of mocks ("cassettes") to run later.
103
102
21. You now need to get those cassettes from the pod to your host and into the
104
103
git repository. There are several ways to do that. The easy and reliable way is to copy them all to `/data/project` inside the pod like `cp -r tests/cassettes /data/project/` to get them on the minikube VM. Then, log out of your pod terminal (since that should all be done if all your tests passed), delete the cassettes in your active repo (`rm tests/cassettes/*`), and replace them from the minikube vm with `scp -i $(minikube ssh-key) docker@$(minikube ip):/data/project/cassettes/* tests/cassettes/`
0 commit comments