Skip to content

Commit

Permalink
Use new test sql function
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Aug 13, 2024
1 parent 7f0eae0 commit b4c7638
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions activation/wire/malfeasance_double_marry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Test_DoubleMarryProof(t *testing.T) {
require.NoError(t, err)

t.Run("valid", func(t *testing.T) {
db := sql.InMemory()
db := sql.InMemoryTest(t)
otherAtx := &types.ActivationTx{}
otherAtx.SetID(types.RandomATXID())
otherAtx.SmesherID = otherSig.NodeID()
Expand Down Expand Up @@ -50,7 +50,7 @@ func Test_DoubleMarryProof(t *testing.T) {
})

t.Run("does not contain same certificate owner", func(t *testing.T) {
db := sql.InMemory()
db := sql.InMemoryTest(t)

atx1 := newActivationTxV2(
withMarriageCertificate(sig, types.EmptyATXID, sig.NodeID()),
Expand Down Expand Up @@ -79,7 +79,7 @@ func Test_DoubleMarryProof(t *testing.T) {
atx1 := newActivationTxV2()
atx1.Sign(sig)

db := sql.InMemory()
db := sql.InMemoryTest(t)
proof, err := NewDoubleMarryProof(db, atx1, atx1, sig.NodeID())
require.ErrorContains(t, err, "ATXs have the same ID")
require.Nil(t, proof)
Expand All @@ -103,7 +103,7 @@ func Test_DoubleMarryProof(t *testing.T) {
})

t.Run("invalid marriage proof", func(t *testing.T) {
db := sql.InMemory()
db := sql.InMemoryTest(t)
otherAtx := &types.ActivationTx{}
otherAtx.SetID(types.RandomATXID())
otherAtx.SmesherID = otherSig.NodeID()
Expand Down Expand Up @@ -150,7 +150,7 @@ func Test_DoubleMarryProof(t *testing.T) {
})

t.Run("invalid certificate proof", func(t *testing.T) {
db := sql.InMemory()
db := sql.InMemoryTest(t)
otherAtx := &types.ActivationTx{}
otherAtx.SetID(types.RandomATXID())
otherAtx.SmesherID = otherSig.NodeID()
Expand Down Expand Up @@ -197,7 +197,7 @@ func Test_DoubleMarryProof(t *testing.T) {
})

t.Run("invalid atx signature", func(t *testing.T) {
db := sql.InMemory()
db := sql.InMemoryTest(t)
otherAtx := &types.ActivationTx{}
otherAtx.SetID(types.RandomATXID())
otherAtx.SmesherID = otherSig.NodeID()
Expand Down Expand Up @@ -233,7 +233,7 @@ func Test_DoubleMarryProof(t *testing.T) {
})

t.Run("invalid certificate signature", func(t *testing.T) {
db := sql.InMemory()
db := sql.InMemoryTest(t)
otherAtx := &types.ActivationTx{}
otherAtx.SetID(types.RandomATXID())
otherAtx.SmesherID = otherSig.NodeID()
Expand Down Expand Up @@ -269,7 +269,7 @@ func Test_DoubleMarryProof(t *testing.T) {
})

t.Run("unknown reference ATX", func(t *testing.T) {
db := sql.InMemory()
db := sql.InMemoryTest(t)

atx1 := newActivationTxV2(
withMarriageCertificate(sig, types.EmptyATXID, sig.NodeID()),
Expand Down

0 comments on commit b4c7638

Please sign in to comment.