@@ -79,7 +79,7 @@ The file should look something like this:
79
79
"expectedResults" : {
80
80
"step-01.ql" : " step-01.csv" ,
81
81
"step-02.ql" : " step-02.csv" ,
82
- "step-03.ql" : " step-03.csv " ,
82
+ "step-03.ql" : false ,
83
83
}
84
84
}
85
85
```
@@ -104,6 +104,12 @@ and csv files for the expected results.
104
104
* ` expectedResults ` is an object that maps expected query filenames to a csv
105
105
file detailing what the expected results for this query should be.
106
106
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
+
107
113
108
114
To simplify course creation,
109
115
we recommend structuring your course folder like so:
@@ -200,18 +206,19 @@ and add a similar workflow file to the one mentioned above.
200
206
201
207
When testing the action ([as detailed above](#testing-the-action)),
202
208
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,
203
210
the actual results that it produces are printed out in the console.
204
211
You can then store this output as the relevant CSV file.
205
212
206
213
So the workflow for adding a new query and CSV file looks like :
207
214
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/`.
213
220
* Re-test the action to ensure it marks the query
214
- as producing the correct results
221
+ as producing the correct results.
215
222
216
223
# ### Publishing your action
217
224
0 commit comments