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
* Add ability to skip individual tests
- Added `runtime.SkipIf`
- Re-combined federation test as it can now be individually skipped on Dendrite.
From a CI perspective, no changes are required as this uses the existing build
tags setup to detect HS impl.
* Update onboarding
Copy file name to clipboardExpand all lines: ONBOARDING.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,7 +189,19 @@ Normally, server logs are only printed when one of the tests fail. To override t
189
189
190
190
### How do I skip a test?
191
191
192
-
Use one of `t.Skipf(...)` or `t.SkipNow()`.
192
+
To conditionally skip a *single* test based on the homeserver being run, add a single line at the start of the test:
193
+
```go
194
+
runtime.SkipIf(t, runtime.Dendrite)
195
+
```
196
+
To conditionally skip an entire *file* based on the homeserver being run, add a [build tag](https://pkg.go.dev/cmd/go#hdr-Build_constraints) at the top of the file which will skip execution of all the tests in this file if Complement is run with this flag:
197
+
```go
198
+
// +build !dendrite_blacklist
199
+
```
200
+
You can also do this based on features for MSC tests (which means you must run Complement *with* this tag for these tests *to run*):
201
+
```go
202
+
// +build msc_2836
203
+
```
204
+
See [GH Actions](https://github.com/matrix-org/complement/blob/master/.github/workflows/ci.yaml) for an example of how this is used for different homeservers in practice.
193
205
194
206
### Why do we use `t.Errorf` sometimes and `t.Fatalf` other times?
0 commit comments