Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 217c1e2

Browse filesBrowse files
committed
bad test fixed
1 parent 61ba84f commit 217c1e2
Copy full SHA for 217c1e2

File tree

2 files changed

+5
-4
lines changed
Filter options

2 files changed

+5
-4
lines changed

‎multi_key_test.go

Copy file name to clipboardExpand all lines: multi_key_test.go
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package etherscan
22

33
import "testing"
44

5-
// TestgetKey may fail is you run test parallel
6-
func TestgetKey(t *testing.T) {
5+
// TestGetKey may fail is you run test parallel
6+
func TestGetKey(t *testing.T) {
77
countApiKey, countBackupApiKey, k := 0, 0, ""
88
for i := 0; i < 10; i++ {
99
k = api.getKey()
10+
t.Logf("key: %s", k)
1011
if apiKey == k {
1112
countApiKey++
1213
} else if backupApiKey == k {
@@ -15,6 +16,6 @@ func TestgetKey(t *testing.T) {
1516
}
1617
equal := countApiKey == 5 && countBackupApiKey == 5
1718
if !equal {
18-
t.Error("api.getKey not working")
19+
t.Errorf("api.getKey not working, expected 5 for each key, got main:%d , backup %d", countApiKey, countBackupApiKey)
1920
}
2021
}

‎setup_e2e_test.go

Copy file name to clipboardExpand all lines: setup_e2e_test.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func init() {
3535
if apiKey == "" {
3636
panic(fmt.Sprintf("API key is empty, set env variable %q with a valid API key to proceed.", apiKeyEnvName))
3737
}
38-
backupApiKey = os.Getenv(apiKeyEnvName)
38+
backupApiKey = os.Getenv(backupApiKeyEnvName)
3939
if backupApiKey == "" {
4040
log.Printf("WARN: Backup API key is empty, set env variable %q with a valid API key to proceed.", backupApiKeyEnvName)
4141
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.