Rename yaml fields
Closed this issue · 6 comments
I'm wondering whether we should rename protocols
to tests
and protocol
to steps
. This might be easier to understand without learning the term 'Protocol' that only scriptkeeper
uses.
This would be a breaking change, but I think that's fine at this point.
Any opinions? @data-pup @matthandlersux @hallettj @xasopheno @iphipps
It would look like this:
tests:
# builds a docker image when git repo is clean
- steps:
- command: /usr/bin/git status --porcelain
stdout: ""
- command: /usr/bin/git rev-parse HEAD
stdout: "mock_commit_hash\n"
- /usr/bin/docker build --tag image_name:mock_commit_hash .
# aborts when git repo is not clean
- steps:
- command: /usr/bin/git status --porcelain
stdout: " M some-file"
exitcode: 1
i like it, and agree, explaining the idea of "protocols" is not necessary when there's a more familiar analogy
Hmm, we probably also should change the filename that scriptkeeper
looks for to find the test file. script.protocols.yaml
doesn't make that much sense anymore. Maybe script.tests.yaml
?
good point. i like that.
which is the more common pattern for test files? plural ______.tests.ext
or singular ______.test.ext
? i'm not sure.
- Jest uses
___.test.js
- Ruby's minitest uses the prefix
test_...
- Java seems to conventionally use the
...Test
suffix.
So maybe ___.test.yaml
?