MCPcopy
hub / github.com/iron-io/functions / TestDatastore

Function TestDatastore

api/datastore/postgres/postgres_test.go:69–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

67}
68
69func TestDatastore(t *testing.T) {
70 _, close := preparePostgresTest(t.Logf, t.Fatalf)
71 defer close()
72
73 u, err := url.Parse(fmt.Sprintf(tmpPostgres, datastoretest.GetContainerHostIP()))
74 if err != nil {
75 t.Fatalf("failed to parse url: %v", err)
76 }
77 ds, err := New(u)
78 if err != nil {
79 t.Fatalf("failed to create postgres datastore: %v", err)
80 }
81
82 datastoretest.Test(t, ds)
83}
84
85func tryRun(logf func(string, ...interface{}), desc string, cmd *exec.Cmd) {
86 var b bytes.Buffer

Callers

nothing calls this directly

Calls 2

preparePostgresTestFunction · 0.85
NewFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…