File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 16
16
* btcli w regen_coldkey
17
17
* btcli w regen_coldkeypub
18
18
* btcli w regen_hotkey
19
+ * btcli w regen_hotkeypub
19
20
"""
20
21
21
22
@@ -542,6 +543,34 @@ def test_wallet_regen(wallet_setup, capfd):
542
543
)
543
544
print ("Passed wallet regen_hotkey command ✅" )
544
545
546
+ hotkeypub_path = os .path .join (wallet_path , "new_wallet" , "hotkeypub.txt" )
547
+ initial_hotkeypub_mod_time = os .path .getmtime (hotkeypub_path )
548
+ result = exec_command (
549
+ command = "wallet" ,
550
+ sub_command = "regen-hotkeypub" ,
551
+ extra_args = [
552
+ "--wallet-name" ,
553
+ "new_wallet" ,
554
+ "--hotkey" ,
555
+ "new_hotkey" ,
556
+ "--wallet-path" ,
557
+ wallet_path ,
558
+ "--ss58-address" ,
559
+ ss58_address ,
560
+ "--overwrite" ,
561
+ ],
562
+ )
563
+
564
+ # Wait a bit to ensure file system updates modification time
565
+ time .sleep (2 )
566
+
567
+ new_hotkeypub_mod_time = os .path .getmtime (hotkey_path )
568
+
569
+ assert initial_hotkeypub_mod_time != new_hotkeypub_mod_time , (
570
+ "Hotkey file was not regenerated as expected"
571
+ )
572
+ print ("Passed wallet regen_hotkeypub command ✅" )
573
+
545
574
546
575
def test_wallet_balance_all (local_chain , wallet_setup , capfd ):
547
576
"""
You can’t perform that action at this time.
0 commit comments