[#4] Change test

TestContract now use covertest invoker.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
pull/10/head
Ekaterina Lebedeva 2023-08-08 17:14:07 +03:00
parent 757ab69527
commit 532e9b2d3c
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,7 @@ func TestContract(t *testing.T) {
ctrDI := covertest.CompileFile(t, e.CommitteeHash, ctrPath, path.Join(ctrPath, "config.yml"))
ctr := ctrDI.Contract
e.DeployContract(t, ctr, nil)
inv := e.CommitteeInvoker(ctr.Hash)
inv := covertest.CommitteeInvoker(e, ctr.Hash)
// test get without put
inv.InvokeFail(t, "Cannot get number", "getNumber", validKey)
@ -48,6 +48,7 @@ func TestContract(t *testing.T) {
// test invalid key
inv.InvokeFail(t, "Invalid key size", "putNumber", invalidKey, 42)
inv.InvokeFail(t, "Invalid key size", "getNumber", invalidKey)
spew.Dump(inv.Methods)
}
func TestRun(t *testing.T) {