-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathsystem-tests.yml
More file actions
318 lines (299 loc) · 9.69 KB
/
Copy pathsystem-tests.yml
File metadata and controls
318 lines (299 loc) · 9.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# This workflow is currently only for use with https://github.com/nektos/act
# via the `act-wrapper` script at the root of this repository, which creates
# a custom container with a freshly built cascade.
#
# Further documentation is in TESTING.md.
#
# TL;DR: `./act-wrapper --job your-test`
#
# ## Creating a new test
#
# You can use the test creation script to generate a new test:
#
# `integration-tests/scripts/add-test.sh <test-name> [<description>] [<PR>]`.
#
# It will add the stub job to this workflow file and create the action file for
# the actual test in `integration-tests/tests/<test-name>` .
# GitHub Actions environment variables are documented at
# https://docs.github.com/en/actions/reference/workflows-and-actions/variables
name: System/Integration tests
on:
# Triggering on PRs and arbitrary branch pushes is not enabled because most
# of the time this expensive test suite should not be run. Using this
# trigger allows explicitly running this test suite on a selected branch.
workflow_dispatch:
inputs:
build-profile:
description: Whether to build and test in debug mode or release mode.
required: false
default: debug
type: choice
options:
- debug
- release
log-level:
description: The level of logging that Cascade should output.
required: false
default: debug
type: choice
options:
- error
- warning
- info
- debug
- trace
env:
# Set this assignment to your choosing to set the cargo build verbosity
CARGO_TERM_VERBOSE: ${{ github.actor != 'nektos/act' }}
# CARGO_TERM_VERBOSE: true
RUST_BACKTRACE: 1
defaults:
run:
# see: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defaultsrunshell
shell: bash --noprofile --norc -eo pipefail -x {0}
jobs:
test-release-version:
name: Example test with prepare environment and cascade --version (release)
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-systest-env
- uses: ./.github/actions/set-build-profile
with:
build-profile: release
- run: cascade --version
- run: file $(which cascade)
test-version:
name: Example test with prepare environment and cascade --version (debug)
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-systest-env
- run: cascade --version
- run: file $(which cascade)
add-zone-query:
name: Add a zone, query the published zone
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/add-zone-query
with:
log-level: ${{ inputs.log-level }}
# Added for https://github.com/NLnetLabs/cascade/pull/402
load-zonefile:
name: Load a zone from a file, query the published zone
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/load-zonefile
with:
log-level: ${{ inputs.log-level }}
# Added for https://github.com/NLnetLabs/cascade/pull/398
review-unsigned-zone:
name: Add a zone, approve the unsigned zone, query the published zone
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/review-unsigned-zone
with:
log-level: ${{ inputs.log-level }}
review-unsigned-zone2:
name: Test that the review server has the original zone
runs-on: ubuntu-latest
strategy:
#max-parallel: 1
matrix:
rust: [stable]
test_idx: [1, 2]
key: ['Kexample.+015+02835.key']
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/review-unsigned-zone2
with:
log-level: ${{ inputs.log-level }}
test_idx: ${{ matrix.test_idx }}
key: ${{ matrix.key }}
ixfr-in:
name: Receive a zone via IXFR from the NSD primary.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/ixfr-in
with:
log-level: ${{ inputs.log-level }}
incremental-signing:
name: Test incremental signing.
runs-on: ubuntu-latest
strategy:
#max-parallel: 1
matrix:
rust: [stable]
zonemd: [''] #, 'zmd384']
policy: ['nsec', 'nsec3', 'nsec3-opt-out']
test_idx: [1, 2, 3, 5]
key: ['Kexample.+015+02835.key']
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/incremental-signing
with:
log-level: ${{ inputs.log-level }}
zonemd: ${{ matrix.zonemd }}
policy: ${{ matrix.policy }}
test_idx: ${{ matrix.test_idx }}
key: ${{ matrix.key }}
incremental-signing-nsec-nsec3:
name: Test switching between NSEC and NSEC3
runs-on: ubuntu-latest
strategy:
#max-parallel: 1
matrix:
rust: [stable]
zonemd: [''] #, 'zmd384']
policy: ['nsec3/nsec', 'nsec3-opt-out/nsec', 'nsec/nsec3',
'nsec3-opt-out/nsec3', 'nsec/nsec3-opt-out',
'nsec3/nsec3-opt-out']
test_idx: [1, 2, 3]
key: ['Kexample.+015+02835.key']
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/incremental-signing-nsec-nsec3
with:
log-level: ${{ inputs.log-level }}
zonemd: ${{ matrix.zonemd }}
policy: ${{ matrix.policy }}
test_idx: ${{ matrix.test_idx }}
key: ${{ matrix.key }}
notify-in-for-unknown-zone:
name: Receive a NOTIFY for a zone that is unknown to Cascade.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: release
- uses: ./integration-tests/tests/notify-in-for-unknown-zone
with:
log-level: ${{ inputs.log-level }}
remove-zone:
name: Add, sign and remove a zone.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/remove-zone
with:
log-level: ${{ inputs.log-level }}
all-rr-types:
name: Tests loading of all supported RR types.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/all-rr-types
with:
log-level: ${{ inputs.log-level }}
# Added for https://github.com/NLnetLabs/cascade/pull/564
upstream-tsig:
name: Use TSIG with an upstream nameserver.
runs-on: ubuntu-latest
strategy:
matrix:
key-source: [cmdline, file]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/upstream-tsig
with:
log-level: ${{ inputs.log-level }}
key-source: ${{ matrix.key-source }}
downstream-tsig:
name: Using TSIG with downstream nameservers.
runs-on: ubuntu-latest
strategy:
# max-parallel: 1
fail-fast: true
matrix:
send-notify-to: [ '', '127.0.0.1:1054', '127.0.0.1:1054^tsig-key' ]
accept-xfr-from: [ '', '127.0.0.1', '127.0.0.1^tsig-key' ]
downstream-expects-tsig: [ 0, 1 ]
downstream-uses-tsig: [ 0, 1 ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/downstream-tsig
with:
log-level: ${{ inputs.log-level }}
send-notify-to: ${{ matrix.send-notify-to }}
accept-xfr-from: ${{ matrix.accept-xfr-from }}
downstream-expects-tsig: ${{ matrix.downstream-expects-tsig }}
downstream-uses-tsig: ${{ matrix.downstream-uses-tsig }}
persist-zone:
name: Added zone should still exist after restart.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/set-build-profile
with:
build-profile: ${{ inputs.build-profile }}
- uses: ./integration-tests/tests/persist-zone
with:
log-level: ${{ inputs.log-level }}