brain/surql/testing/verification.sql

14 lines
494 B
SQL

if (select balance from account:operator1)[0].balance != 10000020000 {
throw("Operator 1 did't get paid for serving a VM.")
};
if (select balance from account:user2)[0].balance != 10000003350 {
throw("User 2 did't get compensated for his VM going down.")
};
if (select escrow from account:operator2)[0].escrow != 4999999996650 {
throw("Operator 2 didn't get punished for not serving a VM.")
};
if (select id from deleted_vm:vm1).len() == 0 {
throw("VM1 didn't get deleted.")
}