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

Function TestOraclesFindWithInvalidId

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

Source from the content-addressed store, hash-verified

136}
137
138func TestOraclesFindWithInvalidId(t *testing.T) {
139 setupOracles(t, false, false, false)
140 defer teardownOracles(t)
141
142 oracles, err := LoadOracles(testFolder)
143 if err != nil {
144 t.Fatal(err)
145 }
146
147 for i := 0; i < testOracles; i++ {
148 if compiled := oracles.Find(uint64(i + 1)); compiled != nil {
149 t.Fatalf("oracle with id %d was not expected to be found", i)
150 }
151 }
152}
153
154func TestOraclesUpdate(t *testing.T) {
155 setupOracles(t, true, 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