-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathfeature-flags.feature
55 lines (51 loc) · 2.79 KB
/
feature-flags.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Feature: Feature flags
Scenario: feature flags are attached to unhandled errors
Given I set environment variable "BUGSNAG_FEATURE_FLAGS" to "[{ name: from config 1, variant: 1234 }, { name: from config 2 }]"
And I start the symfony fixture
When I navigate to the route "/feature-flags/unhandled"
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And event 0 is unhandled
And the event contains the following feature flags:
| featureFlag | variant |
| from config 1 | 1234 |
| from config 2 | |
| added at runtime 1 | |
| added at runtime 2 | runtime_2 |
| added at runtime 4 | |
| from global on error 1 | on error 1 |
| from global on error 2 | |
| from global on error 3 | 111 |
Scenario: feature flags are attached to handled errors
Given I set environment variable "BUGSNAG_FEATURE_FLAGS" to "[{ name: from config 1, variant: 1234 }, { name: from config 2 }]"
And I start the symfony fixture
When I navigate to the route "/feature-flags/handled"
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And event 0 is handled
And the event contains the following feature flags:
| featureFlag | variant |
| from config 1 | 1234 |
| from config 2 | |
| added at runtime 1 | |
| added at runtime 2 | runtime_2 |
| added at runtime 4 | |
| from global on error 1 | on error 1 |
| from global on error 3 | 111 |
| from notify on error | notify 7636390 |
Scenario: feature flags can be cleared entirely with an unhandled error
Given I set environment variable "BUGSNAG_FEATURE_FLAGS" to "[{ name: from config 1, variant: 1234 }, { name: from config 2 }]"
And I start the symfony fixture
When I navigate to the route "/feature-flags/unhandled?clear_all_flags"
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And event 0 is unhandled
And the event has no feature flags
Scenario: feature flags can be cleared entirely with a handled error
Given I set environment variable "BUGSNAG_FEATURE_FLAGS" to "[{ name: from config 1, variant: 1234 }, { name: from config 2 }]"
And I start the symfony fixture
When I navigate to the route "/feature-flags/handled?clear_all_flags"
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And event 0 is handled
And the event has no feature flags