forked from Silverfish/proton-bridge
feat(BRIDGE-266): heartbeat telemetry update; extra integration tests;
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
Feature: Send Telemetry Heartbeat
|
||||
Background:
|
||||
Given there exists an account with username "[user:user1]" and password "password"
|
||||
And there exists an account with username "[user:user2]" and password "password"
|
||||
And there exists an account with username "[user:user3]" and password "password"
|
||||
Then it succeeds
|
||||
When bridge starts
|
||||
Then it succeeds
|
||||
@ -12,28 +14,30 @@ Feature: Send Telemetry Heartbeat
|
||||
When the user logs in with username "[user:user1]" and password "password"
|
||||
And user "[user:user1]" finishes syncing
|
||||
Then bridge eventually sends the following heartbeat:
|
||||
"""
|
||||
"""
|
||||
{
|
||||
"MeasurementGroup": "bridge.any.usage",
|
||||
"Event": "bridge_heartbeat",
|
||||
"Event": "bridge_heartbeat_new",
|
||||
"Values": {
|
||||
"nb_account": 1
|
||||
"NumberConnectedAccounts": 1,
|
||||
"rolloutPercentage": 1
|
||||
},
|
||||
"Dimensions": {
|
||||
"auto_update": "on",
|
||||
"auto_start": "on",
|
||||
"beta": "off",
|
||||
"doh": "off",
|
||||
"split_mode": "off",
|
||||
"show_all_mail": "on",
|
||||
"imap_connection_mode": "starttls",
|
||||
"smtp_connection_mode": "starttls",
|
||||
"imap_port": "default",
|
||||
"smtp_port": "default",
|
||||
"cache_location": "default",
|
||||
"keychain_pref": "default",
|
||||
"prev_version": "0.0.0",
|
||||
"rollout": "42"
|
||||
"isAutoUpdateEnabled": "true",
|
||||
"isAutoStartEnabled": "true",
|
||||
"isBetaEnabled": "false",
|
||||
"isDohEnabled": "false",
|
||||
"usesSplitMode": "false",
|
||||
"useAllMail": "true",
|
||||
"useDefaultImapPort": "true",
|
||||
"useDefaultSmtpPort": "true",
|
||||
"useDefaultCacheLocation": "true",
|
||||
"useDefaultKeychain": "true",
|
||||
"isContactedByAppleNotes": "false",
|
||||
"imapConnectionMode": "starttls",
|
||||
"smtpConnectionMode": "starttls",
|
||||
"prevVersion": "0.0.0",
|
||||
"bridgePlanGroup": "unknown"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@ -59,25 +63,27 @@ Feature: Send Telemetry Heartbeat
|
||||
"""
|
||||
{
|
||||
"MeasurementGroup": "bridge.any.usage",
|
||||
"Event": "bridge_heartbeat",
|
||||
"Event": "bridge_heartbeat_new",
|
||||
"Values": {
|
||||
"nb_account": 1
|
||||
"NumberConnectedAccounts": 1,
|
||||
"rolloutPercentage": 1
|
||||
},
|
||||
"Dimensions": {
|
||||
"auto_update": "off",
|
||||
"auto_start": "off",
|
||||
"beta": "off",
|
||||
"doh": "on",
|
||||
"split_mode": "off",
|
||||
"show_all_mail": "off",
|
||||
"imap_connection_mode": "ssl",
|
||||
"smtp_connection_mode": "ssl",
|
||||
"imap_port": "custom",
|
||||
"smtp_port": "custom",
|
||||
"cache_location": "custom",
|
||||
"keychain_pref": "custom",
|
||||
"prev_version": "0.0.0",
|
||||
"rollout": "42"
|
||||
"isAutoUpdateEnabled": "false",
|
||||
"isAutoStartEnabled": "false",
|
||||
"isBetaEnabled": "false",
|
||||
"isDohEnabled": "true",
|
||||
"usesSplitMode": "false",
|
||||
"useAllMail": "false",
|
||||
"useDefaultImapPort": "false",
|
||||
"useDefaultSmtpPort": "false",
|
||||
"useDefaultCacheLocation": "false",
|
||||
"useDefaultKeychain": "false",
|
||||
"isContactedByAppleNotes": "false",
|
||||
"imapConnectionMode": "ssl",
|
||||
"smtpConnectionMode": "ssl",
|
||||
"prevVersion": "0.0.0",
|
||||
"bridgePlanGroup": "unknown"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@ -97,25 +103,105 @@ Feature: Send Telemetry Heartbeat
|
||||
"""
|
||||
{
|
||||
"MeasurementGroup": "bridge.any.usage",
|
||||
"Event": "bridge_heartbeat",
|
||||
"Event": "bridge_heartbeat_new",
|
||||
"Values": {
|
||||
"nb_account": 1
|
||||
"NumberConnectedAccounts": 1,
|
||||
"rolloutPercentage": 1
|
||||
},
|
||||
"Dimensions": {
|
||||
"auto_update": "on",
|
||||
"auto_start": "on",
|
||||
"beta": "off",
|
||||
"doh": "off",
|
||||
"split_mode": "on",
|
||||
"show_all_mail": "on",
|
||||
"imap_connection_mode": "starttls",
|
||||
"smtp_connection_mode": "starttls",
|
||||
"imap_port": "default",
|
||||
"smtp_port": "default",
|
||||
"cache_location": "default",
|
||||
"keychain_pref": "default",
|
||||
"prev_version": "0.0.0",
|
||||
"rollout": "42"
|
||||
"isAutoUpdateEnabled": "true",
|
||||
"isAutoStartEnabled": "true",
|
||||
"isBetaEnabled": "false",
|
||||
"isDohEnabled": "false",
|
||||
"usesSplitMode": "true",
|
||||
"useAllMail": "true",
|
||||
"useDefaultImapPort": "true",
|
||||
"useDefaultSmtpPort": "true",
|
||||
"useDefaultCacheLocation": "true",
|
||||
"useDefaultKeychain": "true",
|
||||
"isContactedByAppleNotes": "false",
|
||||
"imapConnectionMode": "starttls",
|
||||
"smtpConnectionMode": "starttls",
|
||||
"prevVersion": "0.0.0",
|
||||
"bridgePlanGroup": "unknown"
|
||||
}
|
||||
}
|
||||
"""
|
||||
And bridge do not need to send heartbeat
|
||||
|
||||
|
||||
Scenario: Multiple-users on Bridge reported correctly
|
||||
Then bridge telemetry feature is enabled
|
||||
When the user logs in with username "[user:user1]" and password "password"
|
||||
Then it succeeds
|
||||
When the user logs in with username "[user:user2]" and password "password"
|
||||
Then it succeeds
|
||||
When the user logs in with username "[user:user3]" and password "password"
|
||||
Then it succeeds
|
||||
When bridge needs to explicitly send heartbeat
|
||||
Then bridge eventually sends the following heartbeat:
|
||||
"""
|
||||
{
|
||||
"MeasurementGroup": "bridge.any.usage",
|
||||
"Event": "bridge_heartbeat_new",
|
||||
"Values": {
|
||||
"NumberConnectedAccounts": 3,
|
||||
"rolloutPercentage": 1
|
||||
},
|
||||
"Dimensions": {
|
||||
"isAutoUpdateEnabled": "true",
|
||||
"isAutoStartEnabled": "true",
|
||||
"isBetaEnabled": "false",
|
||||
"isDohEnabled": "false",
|
||||
"usesSplitMode": "false",
|
||||
"useAllMail": "true",
|
||||
"useDefaultImapPort": "true",
|
||||
"useDefaultSmtpPort": "true",
|
||||
"useDefaultCacheLocation": "true",
|
||||
"useDefaultKeychain": "true",
|
||||
"isContactedByAppleNotes": "false",
|
||||
"imapConnectionMode": "starttls",
|
||||
"smtpConnectionMode": "starttls",
|
||||
"prevVersion": "0.0.0",
|
||||
"bridgePlanGroup": "unknown"
|
||||
}
|
||||
}
|
||||
"""
|
||||
And bridge do not need to send heartbeat
|
||||
|
||||
|
||||
Scenario: Send heartbeat explicitly - apple notes tried to connect
|
||||
Then bridge telemetry feature is enabled
|
||||
When the user logs in with username "[user:user1]" and password "password"
|
||||
Then it succeeds
|
||||
When user "[user:user1]" connects IMAP client "1"
|
||||
And IMAP client "1" announces its ID with name "Mac OS X Notes" and version "14.5"
|
||||
When bridge needs to explicitly send heartbeat
|
||||
Then bridge eventually sends the following heartbeat:
|
||||
"""
|
||||
{
|
||||
"MeasurementGroup": "bridge.any.usage",
|
||||
"Event": "bridge_heartbeat_new",
|
||||
"Values": {
|
||||
"NumberConnectedAccounts": 1,
|
||||
"rolloutPercentage": 1
|
||||
},
|
||||
"Dimensions": {
|
||||
"isAutoUpdateEnabled": "true",
|
||||
"isAutoStartEnabled": "true",
|
||||
"isBetaEnabled": "false",
|
||||
"isDohEnabled": "false",
|
||||
"usesSplitMode": "false",
|
||||
"useAllMail": "true",
|
||||
"useDefaultImapPort": "true",
|
||||
"useDefaultSmtpPort": "true",
|
||||
"useDefaultCacheLocation": "true",
|
||||
"useDefaultKeychain": "true",
|
||||
"isContactedByAppleNotes": "true",
|
||||
"imapConnectionMode": "starttls",
|
||||
"smtpConnectionMode": "starttls",
|
||||
"prevVersion": "0.0.0",
|
||||
"bridgePlanGroup": "unknown"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user