-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: loosen some test assertions, fix e2e matcher #933
Conversation
Signed-off-by: Todd Baert <[email protected]>
build: | ||
context: test-harness | ||
dockerfile: flagd/Dockerfile | ||
image: ghcr.io/open-feature/flagd-testbed:v0.5.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use published images.
// the below has to match quotes strings ("str") and numbers (3) to test an error input | ||
and(/^a context containing a key "(.*)", with value "?([^"]*)"?$/, (key: string, value: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matcher probably should have never worked when we first added 3
as an error state, it looks like it was a bug eventually fixed in jest-gherkin
. This regex matches "abc"
and 3
, which fixes the e2e test.
expect(res).toEqual(expect.objectContaining({ | ||
flagKey: testFlagKey, | ||
flagMetadata: {}, | ||
value: false, | ||
reason: 'ERROR', | ||
errorCode: 'TYPE_MISMATCH', | ||
}); | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've loosened a few brittle assertions with this PR, so that if new files are added/defaulted they don't break.
Signed-off-by: Todd Baert <[email protected]>
Fixes a few issues in testing.