TestClose tests if the close method returns any errors. Note: This test is only executed if the initial connection to S3 works.
(t *testing.T)
| 212 | // |
| 213 | // Note: This test is only executed if the initial connection to S3 works. |
| 214 | func TestClose(t *testing.T) { |
| 215 | if !checkConnection() { |
| 216 | t.Skip("No connection to S3 could be established. Probably not running in a proper test environment.") |
| 217 | } |
| 218 | |
| 219 | client := createClient(t, encoding.JSON) |
| 220 | err := client.Close() |
| 221 | if err != nil { |
| 222 | t.Error(err) |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | // checkConnection returns true if a connection could be made, false otherwise. |
| 227 | func checkConnection() bool { |
nothing calls this directly
no test coverage detected