aboutsummaryrefslogtreecommitdiffstats
path: root/tests/transaction_test_util.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/transaction_test_util.go')
-rw-r--r--tests/transaction_test_util.go27
1 files changed, 18 insertions, 9 deletions
diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go
index a6cea972a..65e2c7591 100644
--- a/tests/transaction_test_util.go
+++ b/tests/transaction_test_util.go
@@ -30,20 +30,29 @@ type TransactionTest struct {
Transaction TtTransaction
}
-func RunTransactionTests(file string, notWorking map[string]bool) error {
+func RunTransactionTests(file string) error {
+ skipTest := make(map[string]bool, len(transSkipTests))
+ for _, name := range transSkipTests {
+ skipTest[name] = true
+ }
+
bt := make(map[string]TransactionTest)
if err := LoadJSON(file, &bt); err != nil {
return err
}
- for name, in := range bt {
- var err error
- // TODO: remove this, we currently ignore some tests which are broken
- if !notWorking[name] {
- if err = runTest(in); err != nil {
- return fmt.Errorf("bad test %s: %v", name, err)
- }
- fmt.Println("Transaction test passed:", name)
+
+ for name, test := range bt {
+ // if the test should be skipped, return
+ if skipTest[name] {
+ fmt.Println("Skipping state test", name)
+ return nil
+ }
+ // test the block
+ if err := runTest(test); err != nil {
+ return err
}
+ fmt.Println("Transaction test passed: ", name)
+
}
return nil
}