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
+45-3Lines changed: 45 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,22 +78,64 @@ Pytest is configured to automatically include the flags `--pspec --cov=service -
78
78
79
79
These tests require the service to be running because unlike the the TDD unit tests that test the code locally, these BDD integration tests are using Selenium to manipulate a web page on a running server.
80
80
81
-
Run the tests using `behave`
81
+
#### Run using two shells
82
82
83
83
Start the server in a separate bash shell:
84
84
85
85
```sh
86
86
honcho start
87
87
```
88
88
89
-
Then start behave in your original bash shell:
89
+
Then start `behave` in your original bash shell:
90
90
91
91
```sh
92
92
behave
93
93
```
94
94
95
95
You will see the results of the tests scroll down yur screen using the familiar red/green/refactor colors.
96
96
97
+
#### Run using Kubernetes
98
+
99
+
You can also use Kubernetes to host your application and test against it with BDD. The commands to do this are:
100
+
101
+
```bash
102
+
make cluster
103
+
make build
104
+
make push
105
+
make deploy
106
+
```
107
+
108
+
What did these commands do?
109
+
110
+
| Command | What does it do? |
111
+
|---------|------------------|
112
+
| make cluster | Creates a local Kubernetes cluster using `k3d`|
113
+
| make build | Builds the Docker image |
114
+
| make push | Pushes the image to the local Docker registry |
115
+
| make deploy | Deploys the application using the image that was just built and pushed |
116
+
117
+
Now you can just run `behave` against the application running in the local Kubernetes cluster
118
+
119
+
```bash
120
+
behave
121
+
```
122
+
123
+
### See what images are in the local registry
124
+
125
+
You can use the `curl` command to query what images you have pushed to your local Docker registry. This will return `JSON` so you might want to use the silent flag `-s` and pipe it through `jq` like this:
0 commit comments