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

Function TestServiceCreateBrokenOracle

service/oracles_test.go:76–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestServiceCreateBrokenOracle(t *testing.T) {
77 setup(t, true, true)
78 defer teardown(t)
79
80 if svc, err := New(testFolder, "", ""); err != nil {
81 t.Fatal(err)
82 } else if resp, err := svc.CreateOracle(context.TODO(), &brokenOracle); err != nil {
83 t.Fatal(err)
84 } else if resp.Success {
85 t.Fatalf("expected error response: %v", resp)
86 } else if resp.Oracle != nil {
87 t.Fatalf("unexpected oracle: %v", resp.Oracle)
88 }
89}
90
91func TestServiceUpdateOracle(t *testing.T) {
92 setup(t, true, true)

Callers

nothing calls this directly

Calls 4

setupFunction · 0.85
teardownFunction · 0.85
NewFunction · 0.85
CreateOracleMethod · 0.65

Tested by

no test coverage detected