Skip to content

Commit

Permalink
Enable latest tickets test in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ahobsonsayers committed Sep 25, 2024
1 parent 164a909 commit cd0d6e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/testutils/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func newProxyTransport(proxyListUrls []string) (http.RoundTripper, error) {
return nil, fmt.Errorf("error downloading proxy list: %w", err)
}

proxyLists = getWorkingProxies(proxyLists, 2*time.Second)
proxyLists = getWorkingProxies(proxyLists, 5*time.Second)
if len(proxyLists) == 0 {
return nil, errors.New("none of the proxies in the proxy list are working")
}
Expand Down
14 changes: 5 additions & 9 deletions twickets/twickets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package twickets_test

import (
"context"
"net/http"
"os"
"testing"

Expand All @@ -13,19 +12,16 @@ import (
)

func TestGetLatestTickets(t *testing.T) {
testutils.SkipIfCI(t, "Does not work in CI. Fix")

_ = godotenv.Load(testutils.ProjectDirectoryJoin(t, ".env"))

twicketsAPIKey := os.Getenv("TWICKETS_API_KEY")
require.NotEmpty(t, twicketsAPIKey, "TWICKETS_API_KEY is not set")

httpClient := http.DefaultClient
// httpClient, err := testutils.NewProxyClient(
// testutils.RoosterKidProxyListURL,
// testutils.ProxlifyProxyListURL,
// )
// require.NoError(t, err)
httpClient, err := testutils.NewProxyClient(
testutils.RoosterKidProxyListURL,
testutils.ProxlifyProxyListURL,
)
require.NoError(t, err)

twicketsClient := twickets.NewClient(httpClient)
tickets, err := twicketsClient.FetchTickets(
Expand Down

0 comments on commit cd0d6e9

Please sign in to comment.