From 1f5bdcd8da13c908d55fd89a065845ee0553aa47 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 9 Jan 2023 20:34:54 -0800 Subject: [PATCH] update --- docs/CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 2b28972ab..9c3fb421d 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -88,6 +88,12 @@ Run: `./ci/test.sh` CI runs tests with `-race` to catch potential race conditions. It's much slower, but if your machine can run it locally, you can do so with `./make.sh race`. +If you add a new test and run, it will show failure. That's because the vast majority of +D2's tests are comparing outputs. You don't define the expected output manually. The +testing library generates it and it's checked into version control if it looks right. So +for the first run of a new test, it has no expected output, and will fail. To accept the + result as the expected, run the test with environment variable `TESTDATA_ACCEPT=1`. + #### Chaos tests D2 has [chaos tests](https://en.wikipedia.org/wiki/Chaos_engineering) which produce random