MCPcopy Create free account
hub / github.com/evilsocket/sum / TestOraclesFind

Function TestOraclesFind

storage/oracles_test.go:122–136  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

120}
121
122func TestOraclesFind(t *testing.T) {
123 setupOracles(t, true, false, false)
124 defer teardownOracles(t)
125
126 oracles, err := LoadOracles(testFolder)
127 if err != nil {
128 t.Fatal(err)
129 }
130
131 for i := 0; i < testOracles; i++ {
132 if compiled := oracles.Find(uint64(i + 1)); compiled == nil {
133 t.Fatalf("oracle with id %d not found", i)
134 }
135 }
136}
137
138func TestOraclesFindWithInvalidId(t *testing.T) {
139 setupOracles(t, false, false, false)

Callers

nothing calls this directly

Calls 4

setupOraclesFunction · 0.85
teardownOraclesFunction · 0.85
LoadOraclesFunction · 0.85
FindMethod · 0.45

Tested by

no test coverage detected