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

Function TestNoPrimitiveCleanup

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

Source from the content-addressed store, hash-verified

45}
46
47func TestNoPrimitiveCleanup(t *testing.T) {
48 fac, err := NewBasicFactory(t.Context(), SlogLogger{}, Utils{})
49 if err != nil {
50 t.Fatal(err)
51 }
52 defer fac.Close(t.Context())
53
54 ins, err := fac.Instantiate(t.Context())
55 if err != nil {
56 t.Fatal(err)
57 }
58 defer ins.Close(t.Context())
59
60 actual := ins.Primitive(t.Context())
61
62 const expected = true
63 if actual != expected {
64 t.Errorf("expected: %t, but got: %t", expected, actual)
65 }
66}
67
68func TestNoOptionalPrimitiveCleanup(t *testing.T) {
69 fac, err := NewBasicFactory(t.Context(), SlogLogger{}, Utils{})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected