Skip to content

Commit

Permalink
Assert open tx count from monitoring in scenario (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaBernstein authored Aug 10, 2022
1 parent a1230f3 commit 28a55ce
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scenarioTests/features/health.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@ Feature: Health Endpoint
Scenario: Recently active users
Given I have a bot
When I send the message "/help"
And I wait 0.5 seconds
And I wait 0.2 seconds
And I get the server endpoint "/health"
Then the response body should include "bc_bot_users_active_last{timeframe="1h"}"
But the response body should not include "bc_bot_users_active_last{timeframe="1h"} 0"
And the response body should include "bc_bot_users_count"
But the response body should not include "bc_bot_users_count 0"

Scenario: Open transactions in the cache
Given I have a bot
When I send the message "/cancel"
And I send the message "/simple"
And I wait 0.2 seconds
And I get the server endpoint "/health"
Then the response body should include "bc_bot_tx_states_count 1"
When I send the message "/cancel"
And I wait 0.2 seconds
And I get the server endpoint "/health"
Then the response body should include "bc_bot_tx_states_count 0"

0 comments on commit 28a55ce

Please sign in to comment.