try /transactions too
cicd / ci (push) Failing after 19s
Details
cicd / ci (push) Failing after 19s
Details
parent
daa446cc02
commit
bae33f8c60
|
|
@ -24,22 +24,30 @@ func TestIntegration(t *testing.T) {
|
||||||
}
|
}
|
||||||
//curl --cert certificate.pem --cert-key private_key.pem --auth test_token_bfu2cyvq3il6o: https://api.teller.io/accounts
|
//curl --cert certificate.pem --cert-key private_key.pem --auth test_token_bfu2cyvq3il6o: https://api.teller.io/accounts
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodGet, "https://api.teller.io/accounts", nil)
|
for _, url := range []string{
|
||||||
if err != nil {
|
"https://api.teller.io/accounts",
|
||||||
t.Fatal(err)
|
"https://api.teller.io/accounts/acc_pdvv4810fi9hmrcn6g000/transactions",
|
||||||
}
|
} {
|
||||||
req.SetBasicAuth("test_token_bfu2cyvq3il6o", "")
|
url := url
|
||||||
|
t.Run(url, func(t *testing.T) {
|
||||||
|
req, err := http.NewRequest(http.MethodGet, url, nil)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
req.SetBasicAuth("test_token_bfu2cyvq3il6o", "")
|
||||||
|
|
||||||
resp, err := c.Do(req)
|
resp, err := c.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
body, _ := io.ReadAll(resp.Body)
|
body, _ := io.ReadAll(resp.Body)
|
||||||
if code := resp.StatusCode; code >= 300 {
|
if code := resp.StatusCode; code >= 300 {
|
||||||
t.Fatalf("(%d) %s", code, body)
|
t.Fatalf("(%d) %s", code, body)
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Logf("(%d) %s", resp.StatusCode, body)
|
t.Logf("(%d) %s", resp.StatusCode, body)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue