Skip to content

Commit

Permalink
[fold] Re-enable tests and fix old test
Browse files Browse the repository at this point in the history
  • Loading branch information
seelabs committed Sep 1, 2023
1 parent 9c4abe0 commit 6a01502
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/test/app/XChain_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,22 +466,23 @@ struct XChain_test : public beast::unit_test::suite,
mcAlice, bridge(mcAlice, mcAlice["USD"], mcBob, mcBob["USD"])),
ter(temXCHAIN_BRIDGE_BAD_ISSUES));

// Create where both door accounts are on the same chain. The second
// bridge create should fail.
XEnv(*this)
.tx(create_bridge(
mcAlice, bridge(mcAlice, mcGw["USD"], mcBob, mcBob["USD"])))
.close()
.tx(create_bridge(
mcBob, bridge(mcAlice, mcGw["USD"], mcBob, mcBob["USD"])),
ter(tecDUPLICATE));

// Bridge where the two door accounts are equal.
XEnv(*this).tx(
create_bridge(
mcBob, bridge(mcBob, mcGw["USD"], mcBob, mcGw["USD"])),
ter(temXCHAIN_EQUAL_DOOR_ACCOUNTS));

// Both door accounts are on the same chain is allowed (they likely
// belong to different chains. If they do belong to the same chain, that
// is silly, but doesn't violate any invariants).
XEnv(*this)
.tx(create_bridge(
mcAlice, bridge(mcAlice, mcGw["USD"], mcBob, mcBob["USD"])))
.close()
.tx(create_bridge(
mcBob, bridge(mcAlice, mcGw["USD"], mcBob, mcBob["USD"])))
.close();

// Create a bridge on an account with exactly enough balance to
// meet the new reserve should succeed
XEnv(*this)
Expand Down Expand Up @@ -4199,8 +4200,6 @@ struct XChain_test : public beast::unit_test::suite,
void
run() override
{
testXChainBridgeCreateConstraints();
return;
testXChainBridgeExtraFields();
testXChainCreateBridge();
testXChainBridgeCreateConstraints();
Expand Down

0 comments on commit 6a01502

Please sign in to comment.