lnwallet: run commitment tx tests in parallel

This commit is contained in:
Elle Mouton committed 2023-03-16 17:27:03 +02:00
1 parent 8a2999c789
commit b5d281dca8
1 file changed
+11 -7
+11 -7
View File
@@ -169,8 +169,9 @@ func TestCommitmentAndHTLCTransactions(t *testing.T) {
jsonFile: "test_vectors_legacy.json", jsonFile: "test_vectors_legacy.json",
}, },
{ {
name: "anchors", name: "anchors",
chanType: channeldb.SingleFunderTweaklessBit | channeldb.AnchorOutputsBit, chanType: channeldb.SingleFunderTweaklessBit |
channeldb.AnchorOutputsBit,
jsonFile: "test_vectors_anchors.json", jsonFile: "test_vectors_anchors.json",
}, },
} }
@@ -186,15 +187,18 @@ func TestCommitmentAndHTLCTransactions(t *testing.T) {
err = json.Unmarshal(jsonText, &testCases) err = json.Unmarshal(jsonText, &testCases)
require.NoError(t, err) require.NoError(t, err)
t.Run(set.name, func(t *testing.T) { for _, test := range testCases {
for _, test := range testCases { test := test
test := test name := fmt.Sprintf("%s-%s", set.name, test.Name)
t.Run(name, func(t *testing.T) {
t.Parallel()
t.Run(test.Name, func(t *testing.T) { t.Run(test.Name, func(t *testing.T) {
testVectors(t, set.chanType, test) testVectors(t, set.chanType, test)
}) })
} })
}) }
} }
} }