(t *testing.T, url, bearer string)
| 89 | } |
| 90 | |
| 91 | func getJSONAtt(t *testing.T, url, bearer string) (int, map[string]any) { |
| 92 | t.Helper() |
| 93 | req, _ := http.NewRequest("GET", url, nil) |
| 94 | if bearer != "" { |
| 95 | req.Header.Set("Authorization", "Bearer "+bearer) |
| 96 | } |
| 97 | resp, err := http.DefaultClient.Do(req) |
| 98 | if err != nil { |
| 99 | t.Fatal(err) |
| 100 | } |
| 101 | defer resp.Body.Close() |
| 102 | var body map[string]any |
| 103 | json.NewDecoder(resp.Body).Decode(&body) |
| 104 | return resp.StatusCode, body |
| 105 | } |
| 106 | |
| 107 | func TestAttachment_MetadataAndSignedURL(t *testing.T) { |
| 108 | srv := attTestServer(t) |
no test coverage detected