From 08ff4edec8a589e3ae12820cf83ffce253f61524 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 07:02:42 +0100 Subject: [PATCH] test: update coverage test for all 100 actions - Coverage test now checks 69 actions registered via RegisterAllActions (remaining 31 registered by service lifecycle: events, metrics, estimates) - Fixed RegisterAllActions to include RegisterEstimateActions - Updated expected action list to match all new groups Co-Authored-By: Charon --- actions.go | 1 + actions_coverage_test.go | 32 +++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/actions.go b/actions.go index cb5f7cb..dc8e8df 100644 --- a/actions.go +++ b/actions.go @@ -1022,6 +1022,7 @@ func RegisterAllActions(c *core.Core, ch *chain.Chain, hsdURL, hsdKey string) { RegisterHSDActions(c, hsdURL, hsdKey) RegisterDNSActions(c, ch, hsdURL, hsdKey) RegisterEscrowActions(c, ch) + RegisterEstimateActions(c, ch) } // RegisterHSDActions registers sidechain query actions. diff --git a/actions_coverage_test.go b/actions_coverage_test.go index 2e9ee93..1496e9e 100644 --- a/actions_coverage_test.go +++ b/actions_coverage_test.go @@ -19,21 +19,51 @@ func TestActions_AllRegistered_Good(t *testing.T) { RegisterAllActions(c, ch, "http://127.0.0.1:14037", "testkey") expected := []string{ + // Chain (10) "blockchain.chain.height", "blockchain.chain.info", "blockchain.chain.block", "blockchain.chain.synced", "blockchain.chain.hardforks", "blockchain.chain.stats", - "blockchain.chain.search", + "blockchain.chain.search", "blockchain.chain.difficulty", "blockchain.chain.transaction", + "blockchain.chain.peers", + // Alias (3) "blockchain.alias.list", "blockchain.alias.get", "blockchain.alias.capabilities", + // Network (8) "blockchain.network.gateways", "blockchain.network.topology", "blockchain.network.vpn", "blockchain.network.dns", + "blockchain.network.services", "blockchain.network.discover", + "blockchain.network.vpn.endpoints", "blockchain.network.gateway.register", + // Supply (4) "blockchain.supply.total", "blockchain.supply.hashrate", + "blockchain.supply.emission", "blockchain.supply.circulating", + // Wallet (8) "blockchain.wallet.create", "blockchain.wallet.address", "blockchain.wallet.seed", + "blockchain.wallet.restore", "blockchain.wallet.info", "blockchain.wallet.validate", + "blockchain.wallet.balance", "blockchain.wallet.history", + // Crypto (4) "blockchain.crypto.hash", "blockchain.crypto.generate_keys", "blockchain.crypto.check_key", "blockchain.crypto.validate_address", + // Asset (8) "blockchain.asset.info", "blockchain.asset.list", "blockchain.asset.deploy", + "blockchain.asset.emit", "blockchain.asset.burn", "blockchain.asset.balance", + "blockchain.asset.transfer", "blockchain.asset.whitelist", + // Escrow (5) + "blockchain.escrow.create", "blockchain.escrow.fund", + "blockchain.escrow.release", "blockchain.escrow.refund", "blockchain.escrow.status", + // Forge (4) "blockchain.forge.release", "blockchain.forge.issue", "blockchain.forge.build", "blockchain.forge.event", + // HSD (3) "blockchain.hsd.info", "blockchain.hsd.resolve", "blockchain.hsd.height", + // DNS (3) "blockchain.dns.resolve", "blockchain.dns.names", "blockchain.dns.discover", + // Relay (1) + "blockchain.relay.info", + // Identity (2) + "blockchain.identity.lookup", "blockchain.identity.verify", + // Mining (3) + "blockchain.mining.template", "blockchain.mining.difficulty", "blockchain.mining.reward", + // Estimate (3) + "blockchain.estimate.supply_at_height", "blockchain.estimate.block_time", + "blockchain.estimate.height_at_time", } missing := 0