Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-adapter-testsuite
Commits
74a0fd7b
Unverified
Commit
74a0fd7b
authored
2 years ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
test: add tests for broadcast and poll retries
Retry once on 403 with new credentials
parent
c53f1efe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
features/adapter_broadcast.feature
features/adapter_broadcast.feature
+22
-1
features/adapter_poll.feature
features/adapter_poll.feature
+21
-0
No files found.
features/adapter_broadcast.feature
View file @
74a0fd7b
...
...
@@ -15,4 +15,25 @@ Feature: Can the adapter broadcast messages?
When
the auth method is called
When
a mock notify API response is configured to return an error
When
the broadcast method is called
Then
an error response is returned with status 403
\ No newline at end of file
Then
an error response is returned with status 403
Scenario
:
On 403 the message is retried once with new credentials
Given
valid config
When
the adapter instance is created
When
the auth method is called
When
a mock notify API response is configured to return an error
When
the broadcast method is called
Then
an error response is returned with status 403
Then
the credentials are deleted
Then
the broadcast method was called with is_retry on
Then
the getAuthorizationHeader method is called
Scenario
:
On a retried 403 the message is not retried again
Given
valid config
When
the adapter instance is created
When
the auth method is called
When
a mock notify API response is configured to return an error
When
the broadcast method is called with is_retry on
Then
an error response is returned with status 403
Then
the credentials are deleted
Then
the broadcast method is not called again
This diff is collapsed.
Click to expand it.
features/adapter_poll.feature
View file @
74a0fd7b
...
...
@@ -40,3 +40,24 @@ Feature: Can the adapter receive messages?
When
a mock receive API response is configured to return an error
When
the poll method is called
Then
an error response is returned with status 403
Scenario
:
On 403 the message is retried once with new credentials
Given
valid config
When
the adapter instance is created
When
the auth method is called
When
a mock receive API response is configured to return an error
When
the publish method is called
Then
an error response is returned with status 403
Then
the credentials are deleted
Then
the receive method was called with is_retry on
Then
the getAuthorizationHeader method is called
Scenario
:
On a retried 403 the message is not retried again
Given
valid config
When
the adapter instance is created
When
the auth method is called
When
a mock receive API response is configured to return an error
When
the receive method is called with is_retry on
Then
an error response is returned with status 403
Then
the credentials are deleted
Then
the receive method is not called again
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment