Skip to content

Commit f4a8191

Browse files
committed
Updates to chapter 7
1 parent f57020d commit f4a8191

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

chapter_4/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Create a workflow that:
5050
Create a new file `.github/workflows/integration-tests.yml` and, in that file, start by giving the workflow a name, for
5151
example `name: Run integration tests`.
5252

53-
### Task 2: Make It Runnable from GitHub
53+
## Task 2: Make It Runnable from GitHub
5454

5555
Add a manual trigger so we can start it from the GitHub UI:
5656

@@ -79,19 +79,19 @@ workflow_call:
7979
default: 'development'
8080
```
8181

82-
### Task 3: Add permissions to your workflow
82+
## Task 3: Add permissions to your workflow
8383

8484
```
8585
permissions:
8686
contents: read
8787
```
8888

89-
### Task 4: Configure Environment Variables
89+
## Task 4: Configure Environment Variables
9090

9191
The integration tests expect a database connection string via `TICKETS_DATABASE_URL` Set this environment variable in
9292
your workflow, the value should be `postgresql+psycopg://train:train@db:5432/train`.
9393

94-
### Task 5: Define a Job
94+
## Task 5: Define a Job
9595

9696
Create a job named tests that runs on Ubuntu:
9797

@@ -106,7 +106,7 @@ This means that Github will provision a fresh Ubuntu machine where nothing is pr
106106

107107
The runner starts empty so we need to set up a list of steps that run subsequencially.
108108

109-
#### Step 1: Checkout the repository
109+
### Step 1: Checkout the repository
110110

111111
The runner starts empty so your code does not exist there until you download it.
112112

@@ -120,7 +120,7 @@ Add a step that checks out the repository using `actions/checkout@v4`. The struc
120120
ref: * Nme of your branch *
121121
```
122122

123-
#### Step 2: Set up Python
123+
### Step 2: Set up Python
124124

125125
To ensure that all participants run tests with the same interpreter, add a step that uses `actions/setup-python@v5`. The
126126
structure is
@@ -132,7 +132,7 @@ structure is
132132
python-version: * Pytohn version you are using *
133133
```
134134

135-
#### Step 3: Install the project
135+
### Step 3: Install the project
136136

137137
```
138138
- name: Install dependencies
@@ -143,7 +143,7 @@ structure is
143143

144144
**Hint**: If you run this in the wrong directory, pip will fail with: `neither setup.py nor pyproject.toml` found.
145145

146-
#### Step 4: Run the Integration Tests
146+
### Step 4: Run the Integration Tests
147147

148148
```
149149
- name: Run integration tests with pytest

chapter_7/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ shared cloud bill, no angry conductor breathing down your neck.
165165

166166
## Task 4: Integration between the two APIs
167167

168-
Where task 3 still only allowed you tu run two tests which were independent of each other, and did not interact
168+
Where task 3 still only allowed you to run two tests which were independent of each other, and did not interact
169169
in-between the two APIs, we will now write a larger scale test. As you may have noticed earlier, there is an endpoint in
170-
the Tickets API for counting the number of passengers on a train. Addtionally, in the Train Logistics™ API, there
170+
the Tickets API
171+
for [counting the number of passengers on a train](https://github.com/equinor/tickets-api/blob/64e229f9d8ecaa2f5a619b46cee6ed1c372620ca/src/tickets_api/app.py#L91-L96).
172+
Additionally, in the Train Logistics™ API, there
171173
is
172174
an [endpoint for buying new stock](https://github.com/equinor/train-logistics/blob/dc61d8818b42909146392350e71d07487fb4f407/src/train_logistics/app.py#L74-L116)
173175
for a train. Have a look and notice that the logistics application asks the Tickets API for the number of passengers on

0 commit comments

Comments
 (0)