@@ -10,95 +10,100 @@ import (
1010// TestCustodyGet tests querying custody for an address.
1111func TestCustodyGet (t * testing.T ) {
1212 skipIfContainerNotRunning (t )
13+ testAddr := getTestAddress (t )
1314 client := getTestClient (t )
1415 defer client .Close ()
1516
1617 ctx , cancel := getTestContext ()
1718 defer cancel ()
1819
1920 mod := custody .New (client )
20- result , err := mod .Get (ctx , TestAddress )
21+ result , err := mod .Get (ctx , testAddr )
2122 if err != nil {
2223 // This may fail if no custody is set
2324 t .Logf ("Custody get query: %v (expected if no custody)" , err )
2425 return
2526 }
2627
27- t .Logf ("Custody for %s: %s" , TestAddress , string (result ))
28+ t .Logf ("Custody for %s: %s" , testAddr , string (result ))
2829}
2930
3031// TestCustodyCustodians tests querying custody custodians.
3132func TestCustodyCustodians (t * testing.T ) {
3233 skipIfContainerNotRunning (t )
34+ testAddr := getTestAddress (t )
3335 client := getTestClient (t )
3436 defer client .Close ()
3537
3638 ctx , cancel := getTestContext ()
3739 defer cancel ()
3840
3941 mod := custody .New (client )
40- result , err := mod .Custodians (ctx , TestAddress )
42+ result , err := mod .Custodians (ctx , testAddr )
4143 if err != nil {
4244 // This may fail if no custodians are set
4345 t .Logf ("Custodians query: %v (expected if no custodians)" , err )
4446 return
4547 }
4648
47- t .Logf ("Custodians for %s: %s" , TestAddress , string (result ))
49+ t .Logf ("Custodians for %s: %s" , testAddr , string (result ))
4850}
4951
5052// TestCustodyWhitelist tests querying custody whitelist.
5153func TestCustodyWhitelist (t * testing.T ) {
5254 skipIfContainerNotRunning (t )
55+ testAddr := getTestAddress (t )
5356 client := getTestClient (t )
5457 defer client .Close ()
5558
5659 ctx , cancel := getTestContext ()
5760 defer cancel ()
5861
5962 mod := custody .New (client )
60- result , err := mod .Whitelist (ctx , TestAddress )
63+ result , err := mod .Whitelist (ctx , testAddr )
6164 if err != nil {
6265 // This may fail if no whitelist is set
6366 t .Logf ("Whitelist query: %v (expected if no whitelist)" , err )
6467 return
6568 }
6669
67- t .Logf ("Whitelist for %s: %s" , TestAddress , string (result ))
70+ t .Logf ("Whitelist for %s: %s" , testAddr , string (result ))
6871}
6972
7073// TestCustodyLimits tests querying custody limits.
7174func TestCustodyLimits (t * testing.T ) {
7275 skipIfContainerNotRunning (t )
76+ testAddr := getTestAddress (t )
7377 client := getTestClient (t )
7478 defer client .Close ()
7579
7680 ctx , cancel := getTestContext ()
7781 defer cancel ()
7882
7983 mod := custody .New (client )
80- result , err := mod .Limits (ctx , TestAddress )
84+ result , err := mod .Limits (ctx , testAddr )
8185 if err != nil {
8286 // This may fail if no limits are set
8387 t .Logf ("Limits query: %v (expected if no limits)" , err )
8488 return
8589 }
8690
87- t .Logf ("Limits for %s: %s" , TestAddress , string (result ))
91+ t .Logf ("Limits for %s: %s" , testAddr , string (result ))
8892}
8993
9094// TestCustodyCustodiansPool tests querying custody pool for an address.
9195func TestCustodyCustodiansPool (t * testing.T ) {
9296 skipIfContainerNotRunning (t )
97+ testAddr := getTestAddress (t )
9398 client := getTestClient (t )
9499 defer client .Close ()
95100
96101 ctx , cancel := getTestContext ()
97102 defer cancel ()
98103
99104 mod := custody .New (client )
100- result , err := mod .CustodiansPool (ctx , TestAddress )
105+ result , err := mod .CustodiansPool (ctx , testAddr )
101106 requireNoError (t , err , "Failed to query custody pool" )
102107
103- t .Logf ("Custody pool for %s: %s" , TestAddress , string (result ))
108+ t .Logf ("Custody pool for %s: %s" , testAddr , string (result ))
104109}
0 commit comments