From ccd4ce6faa298d163774462287142285056d463d Mon Sep 17 00:00:00 2001 From: Frank Budinsky Date: Fri, 17 Apr 2020 14:17:20 -0400 Subject: [PATCH] Document check for lint errors in generated snip.sh files (#7100) * Document source of user confusion * tweak --- tests/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/README.md b/tests/README.md index 3c4c72443e..7ebbd1d960 100644 --- a/tests/README.md +++ b/tests/README.md @@ -37,6 +37,16 @@ To write an `istio.io` test, follow these steps: both a bash function and a variable containing the expected output. The name of the variable will be the same as the function, only with `_out` appended. +1. Run `make lint-fast` to check for script errors. + + If there are any lint errors in the generated `snip.sh` file, + it means that a command in the `index.md` file is not following `bash` best practices. + Because we are extracting the commands from the markdown file into a script file, we get the + added benefit of lint checking of the commands that appear in the docs. + + Fix the errors, if any, by updating the corresponding command in the `index.md` file and + then regenerate the snips. + 1. Pick an appropriate location under the `tests/` directory and create a directory for your new test.