MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / TestClose

Function TestClose

driver/oss/s3_test.go:214–224  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

212//
213// Note: This test is only executed if the initial connection to S3 works.
214func 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.
227func checkConnection() bool {

Callers

nothing calls this directly

Calls 4

checkConnectionFunction · 0.85
createClientFunction · 0.85
CloseMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected