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

Function TestClient

driver/oss/s3_test.go:36–52  ·  view source on GitHub ↗

TestClient tests if reading from, writing to and deleting from the store works properly. A struct is used as value. See TestTypes() for a test that is simpler but tests all types. Note: This test is only executed if the initial connection to S3 works.

(t *testing.T)

Source from the content-addressed store, hash-verified

34//
35// Note: This test is only executed if the initial connection to S3 works.
36func TestClient(t *testing.T) {
37 if !checkConnection() {
38 t.Skip("No connection to S3 could be established. Probably not running in a proper test environment.")
39 }
40
41 // Test with JSON
42 t.Run("JSON", func(t *testing.T) {
43 client := createClient(t, encoding.JSON)
44 test.TestStore(client, t)
45 })
46
47 // Test with gob
48 t.Run("gob", func(t *testing.T) {
49 client := createClient(t, encoding.Gob)
50 test.TestStore(client, t)
51 })
52}
53
54// TestTypes tests if setting and getting values works with all Go types.
55//

Callers

nothing calls this directly

Calls 3

checkConnectionFunction · 0.85
createClientFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected