Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit d84c686

Browse files
committed
Update README to talk about false values for expectedResults.
1 parent 3dcd67e commit d84c686

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The file should look something like this:
7979
"expectedResults": {
8080
"step-01.ql": "step-01.csv",
8181
"step-02.ql": "step-02.csv",
82-
"step-03.ql": "step-03.csv",
82+
"step-03.ql": false,
8383
}
8484
}
8585
```
@@ -104,6 +104,12 @@ and csv files for the expected results.
104104
* `expectedResults` is an object that maps expected query filenames to a csv
105105
file detailing what the expected results for this query should be.
106106
Only the first expression for each row in the query results is checked.
107+
If instead of a CSV filename, `false` is used,
108+
then the checker will assume that the CSV file has simply
109+
never been generated,
110+
and will print out the resulting output from the query for you to copy into a
111+
new file.
112+
107113

108114
To simplify course creation,
109115
we recommend structuring your course folder like so:
@@ -200,18 +206,19 @@ and add a similar workflow file to the one mentioned above.
200206

201207
When testing the action ([as detailed above](#testing-the-action)),
202208
when a query that is run produces unexpected results,
209+
or it is specified as `false` in `config.yml` instead of listing a CSV filename,
203210
the actual results that it produces are printed out in the console.
204211
You can then store this output as the relevant CSV file.
205212

206213
So the workflow for adding a new query and CSV file looks like:
207214

208-
* add the query (`.ql` file) to `answers/`
209-
* add the query to `config.json`
210-
(remember that the path should be relative to `answers/`)
211-
* Test the action (whichever method you prefer)
212-
* Copy the CSV output to the appropriate file in `image/config/`
215+
* add the query (`.ql` file) to `answers/`.
216+
* add the query to the `expectedResults` property in `config.json`,
217+
with a starting value of `false`.
218+
* Test the action (whichever method you prefer).
219+
* Copy the CSV output to the appropriate file in `image/config/`.
213220
* Re-test the action to ensure it marks the query
214-
as producing the correct results
221+
as producing the correct results.
215222

216223
#### Publishing your action
217224

0 commit comments

Comments
 (0)