MCPcopy Create free account
hub / github.com/arcjet/gravity / TestResultPrimitiveCleanup

Function TestResultPrimitiveCleanup

examples/basic/basic_test.go:93–115  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

91}
92
93func TestResultPrimitiveCleanup(t *testing.T) {
94 fac, err := NewBasicFactory(t.Context(), SlogLogger{}, Utils{})
95 if err != nil {
96 t.Fatal(err)
97 }
98 defer fac.Close(t.Context())
99
100 ins, err := fac.Instantiate(t.Context())
101 if err != nil {
102 t.Fatal(err)
103 }
104 defer ins.Close(t.Context())
105
106 actual, err := ins.ResultPrimitive(t.Context())
107 if err != nil {
108 t.Fatal(err)
109 }
110
111 const expected = true
112 if actual != expected {
113 t.Errorf("expected: %t, but got: %t", expected, actual)
114 }
115}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected