Skip to content

Commit

Permalink
fixup! feat: Add evaluation details to finally hook stage #403
Browse files Browse the repository at this point in the history
Signed-off-by: christian.lutnik <christian.lutnik@dynatrace.com>
  • Loading branch information
chrfwow committed Jan 16, 2025
1 parent 3a47b13 commit 2dff5ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion specification/assets/gherkin/evaluation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: Flag evaluation
# This test suite contains scenarios to test the flag evaluation API.

Background:
Given a provider is registered with cache disabled
Given a stable provider

# basic evaluation
Scenario: Resolves boolean value
Expand Down
18 changes: 9 additions & 9 deletions specification/assets/gherkin/hooks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Feature: Evaluation details through hooks
# This test suite contains scenarios to test the functionality of hooks.

Background:
Given a provider is registered with cache disabled
Given a stable provider

Scenario: Passes evaluation details to after and finally hooks
Given a client with added hook
And a boolean-flag with key "boolean-flag" and a default value "false"
When the flag was evaluated with details
Then "before" hooks should be called
And "after, finally after" hooks should be called with evaluation details
Then the "before" hook should have been executed
And the "after, finally after" hooks should be called with evaluation details
| data_type | key | value |
| string | flag_key | boolean-flag |
| boolean | value | true |
Expand All @@ -25,9 +25,9 @@ Feature: Evaluation details through hooks
Given a client with added hook
And a string-flag with key "missing-flag" and a default value "uh-oh"
When the flag was evaluated with details
Then "before" hooks should be called
And "error" hooks should be called
And "finally after" hooks should be called with evaluation details
Then the "before" hook should have been executed
And the "error" hook should have been executed
And the "finally after" hooks should be called with evaluation details
| data_type | key | value |
| string | flag_key | missing-flag |
| string | value | uh-oh |
Expand All @@ -40,9 +40,9 @@ Feature: Evaluation details through hooks
Given a client with added hook
And a string-flag with key "wrong-flag" and a default value "13"
When the flag was evaluated with details
Then "before" hooks should be called
And "error" hooks should be called
And "finally after" hooks should be called with evaluation details
Then the "before" hook should have been executed
And the "error" hook should have been executed
And the "finally after" hooks should be called with evaluation details
| data_type | key | value |
| string | flag_key | wrong-flag |
| integer | value | 13 |
Expand Down

0 comments on commit 2dff5ea

Please sign in to comment.