From 4e535f1838caf391502f5196c4102b906ac3e429 Mon Sep 17 00:00:00 2001 From: Bronek Kozicki Date: Tue, 14 Oct 2025 17:41:29 +0100 Subject: [PATCH] Add testDeletePermissionedDomainOwner() --- src/test/app/AccountDelete_test.cpp | 53 ++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/src/test/app/AccountDelete_test.cpp b/src/test/app/AccountDelete_test.cpp index 1ac0256dcb..c45ff0750e 100644 --- a/src/test/app/AccountDelete_test.cpp +++ b/src/test/app/AccountDelete_test.cpp @@ -18,8 +18,10 @@ //============================================================================== #include +#include #include +#include #include namespace ripple { @@ -1251,21 +1253,48 @@ public: } } + void + testDeletePermissionedDomainOwner() + { + using namespace jtx; + + Env env{*this}; + Account alice{"alice"}; + Account becky{"becky"}; + env.fund(XRP(1000), alice, becky); + env.close(); + env(fset(becky, asfDepositAuth)); + env.close(); + + pdomain::Credentials const credentials1{ + {.issuer = alice, .credType = "foobaz"}}; + + env(pdomain::setTx(alice, credentials1)); + // Close 256 ledgers + for (int i = 0; i < 256; ++i) + env.close(); + + auto const acctDelFee{drops(env.current()->fees().increment)}; + env(acctdelete(alice, becky), fee(acctDelFee), ter{tecNO_PERMISSION}); + env.close(); + } + void run() override { - testBasics(); - testDirectories(); - testOwnedTypes(); - testResurrection(); - testAmendmentEnable(); - testTooManyOffers(); - testImplicitlyCreatedTrustline(); - testBalanceTooSmallForFee(); - testWithTickets(); - testDest(); - testDestinationDepositAuthCredentials(); - testDeleteCredentialsOwner(); + // testBasics(); + // testDirectories(); + // testOwnedTypes(); + // testResurrection(); + // testAmendmentEnable(); + // testTooManyOffers(); + // testImplicitlyCreatedTrustline(); + // testBalanceTooSmallForFee(); + // testWithTickets(); + // testDest(); + // testDestinationDepositAuthCredentials(); + // testDeleteCredentialsOwner(); + testDeletePermissionedDomainOwner(); } };