Skip to content

Commit

Permalink
test(e2e): disable test account manager
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Jan 3, 2025
1 parent 622bbfa commit 680dbb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
GOTD_TEST_EXTERNAL: 1
GOTD_MTPROXY_ADDR: "127.0.0.1:3128"
TEST_ACCOUNTS_BROKEN: 1 # use external test accounts
TEST_ACCOUNT_MANAGER_DISABLED: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_JOB_ID: ${{ github.job }}
GITHUB_RUN_ID: ${{ github.run_id }}
Expand Down
5 changes: 4 additions & 1 deletion telegram/internal/e2etest/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@ func NewSuite(t *testing.T, config TestOptions) *Suite {
rand: config.Random,
used: make(map[string]struct{}),
}
if managerEnabled, _ := strconv.ParseBool(os.Getenv("TEST_ACCOUNTS_BROKEN")); managerEnabled {
if broken, _ := strconv.ParseBool(os.Getenv("TEST_ACCOUNTS_BROKEN")); broken {
t.Log("External test accounts are used as per TEST_ACCOUNTS_BROKEN")
} else {
t.Log("Normal test accounts are used")
s.manager = nil // disable manager
}
if disabled, _ := strconv.ParseBool(os.Getenv("TEST_ACCOUNT_MANAGER_DISABLED")); s.manager != nil && disabled {
t.Skip("Test account manager is disabled")
}
t.Cleanup(func() {
require.NoError(t, s.Close())
})
Expand Down

0 comments on commit 680dbb6

Please sign in to comment.