-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathconnection.feature
More file actions
100 lines (90 loc) · 3.72 KB
/
connection.feature
File metadata and controls
100 lines (90 loc) · 3.72 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Feature: flagd provider disconnect and reconnect functionality
@rpc @in-process @file
Scenario Outline: Connection
Given a <name> flagd provider
And a Boolean-flag with key "boolean-flag" and a default value "false"
When the flag was evaluated with details
Then the resolved details value should be "true"
Scenarios: Stable
| name |
| stable |
@customCert
Scenarios: Certificates
| name |
| ssl |
@unixsocket @os.linux
Scenarios: Unixsocket
| name |
| socket |
@rpc @in-process @file @reconnect
# This test suite tests the reconnection functionality of flagd providers
Scenario Outline: Provider reconnection
Given a <name> flagd provider
And a ready event handler
And a error event handler
When a ready event was fired
When the connection is lost for 5s
Then the error event handler should have been executed
Then the ready event handler should have been executed
Scenarios: Stable
| name |
| stable |
@customCert
Scenarios: Certificates
| name |
| ssl |
# unix sockets and reconnects is a strange topic and not as easily handled as like tcp reconnects
# @unixsocket @os.linux
# Scenarios: Unixsocket
# | name |
# | socket |
@rpc @in-process @file @unavailable
Scenario: Provider unavailable
Given an option "deadlineMs" of type "Integer" with value "1000"
And a unavailable flagd provider
And a error event handler
Then the error event handler should have been executed within 3000ms
@rpc @in-process @forbidden
# This test ensures that a forbidden response from flagd results in a fatal client state
Scenario: Provider forbidden
Given an option "fatalStatusCodes" of type "StringList" with value "PERMISSION_DENIED"
And a forbidden flagd provider
And a error event handler
Then the error event handler should have been executed within 5000ms
And the client should be in fatal state
@targetURI @rpc
Scenario: Connection via TargetUri rpc
Given an option "targetUri" of type "String" with value "envoy://localhost:<port>/rpc.service"
And a stable flagd provider
And a Boolean-flag with key "boolean-flag" and a default value "false"
When the flag was evaluated with details
Then the resolved details value should be "true"
@targetURI @in-process
Scenario: Connection via TargetUri in-process
Given an option "targetUri" of type "String" with value "envoy://localhost:<port>/sync.service"
And a stable flagd provider
And a Boolean-flag with key "boolean-flag" and a default value "false"
When the flag was evaluated with details
Then the resolved details value should be "true"
@targetURI @in-process @reconnect
Scenario: Re-Connection via TargetUri in-process
Given an option "targetUri" of type "String" with value "envoy://localhost:<port>/sync.service"
And a stable flagd provider
And a ready event handler
And a error event handler
When a ready event was fired
When the connection is lost for 3s
Then the error event handler should have been executed
Then the ready event handler should have been executed
@targetURI @in-process @reconnect @grace
Scenario: Re-Connection via TargetUri in-process with grace period
Given an option "targetUri" of type "String" with value "envoy://localhost:<port>/sync.service"
And a stable flagd provider
And a ready event handler
And a stale event handler
And a error event handler
When a ready event was fired
When the connection is lost for 3s
Then the stale event handler should have been executed
Then the error event handler should have been executed
Then the ready event handler should have been executed