jbang-action icon indicating copy to clipboard operation
jbang-action copied to clipboard

fix(container-structure-test): adapt expectedError regex

Open beiertu-mms opened this issue 11 months ago • 3 comments

The brackets [] seems to cause the regex to be parsed wrongly when using container-structure-test. Therefore, split it into multiple regex and check for each strings individually.

Follow up of https://github.com/jbangdev/jbang-action/pull/36

Related to https://github.com/jbangdev/jbang-action/issues/35

beiertu-mms avatar Apr 03 '24 21:04 beiertu-mms

@maxandersen I'm sorry, but this should now fix the error. I verify it with a simple workflow in my fork (https://github.com/beiertu-mms/jbang-action/pull/2).

beiertu-mms avatar Apr 03 '24 21:04 beiertu-mms

Isn't it enough to have it be [ and ]?

maxandersen avatar Apr 03 '24 21:04 maxandersen

Isn't it enough to have it be [ and ]?

you mean like this?

regex: ["Trusting permanently:", "https://github.com/jruby"]

Edit: or you mean to have it like this?

regex:
  - "[Trusting permanently:]"
  - "[https://github.com/jruby]"

beiertu-mms avatar Apr 03 '24 21:04 beiertu-mms

this was missed because the container test file actually comes from github.com/jbangdev/jbang repo. 0.117.1 should have fix for this.

maxandersen avatar Jul 07 '24 19:07 maxandersen