Closed kbrock closed 1 month ago
If these are meant for tests, can we move them under the spec directory? I think of examples as more user-facing references. I don't think users want to create invalid asls, which is what most of these are.
These are use cases to testing that we are produce the same errors / results as aws state machines.
I'll move to tests
update:
examples
into spec/fixtures
(the existing ones in there are actual examples)I'm keeping a running tally of examples to validate our behavior in the future
fixtures / integration tests
Overview
A number of asl files are working differently in floe from AWS State Language runtime.
Here are some fixtures to ensure that both environments work the same.
File Naming
test-[state]-[status]-comment
State
The
State
is theState
under test. We currently have tests forPass
,Fail
,Task
, andChoice
.Status
pass
files contain a number of tests run inline.fail
tests take a parameter like{"test":1}
to subequent tests. Since these throw an uncatchable runtime error, we need to execute each individually.invalid
tests have a parser error. They are not json errors, but rather semantic errors.Future
runner script
I currently have a runner script ref. Though working, it is still a WIP. I can add to this repo if desired.
Tasks
I have tests for tasks, but am unsure the best way to post the hello world container. It outputs to stderr, stdout, and changes the return code.
Can't remember where we had agreed upon putting this.