Open mungojam opened 2 years ago
I forgot to add, if I take out the When
condition from the Background then it works fine. And it works fine for Scenario
rather than Scenario Outline
too
I tried to workaround this in two different ways, but both failed in another way (same as each other):
Scenario Outline
blocks. I thought this would work as the docs suggest that a Given
statement resets the context. However, I found that it then skipped the check altogether based on Given I have aws_iam_policy_document data configured
, which was the first step of my actual check (sorry confused matters as I use a different example above)Background
to using pre-conditions. This gave the same issue as the first workaround, where it could no longer find my aws_iam_policy_document
that was in my first Given
.I haven't yet found a working workaround.
Sorry for bumping into this problem Mark. I will have a look this problem within this week.
It works with @precondition
but doesn't really with Background
. It loses all the context when Background is used - which is not a precondition for a Given
directive, but it is for When
and Then
as they need to know what to use, how to use.
Super weird. This could be an issue as the radish
library we use is old and they made quite a big change before releasing 1.0.0. This will require deeper investigation, sorry will take time.
It works with
@precondition
but doesn't really withBackground
. It loses all the context when Background is used - which is not a precondition for aGiven
directive, but it is forWhen
andThen
as they need to know what to use, how to use.Super weird. This could be an issue as the
radish
library we use is old and they made quite a big change before releasing 1.0.0. This will require deeper investigation, sorry will take time.
Thanks Emre, I appreciate you looking into it when you get a chance. It's a bit of a side-project for me to get these new checks in.
Description
If I have a Given-When condition in a
Background
step and I add aScenario Outline
, then an error is thrown:To Reproduce
Use the same terraform and plan.json as in https://github.com/terraform-compliance/cli/issues/498#issuecomment-1038233721) and then try the following feature file: