File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import (
77 "testing"
88)
99
10+ const (
11+ defaultAddr = "127.0.0.1:1234"
12+ )
13+
1014func GetLotusToken (lotusFolderPath string ) (string , error ) {
1115 tokenFullPath := filepath .Join (lotusFolderPath , "token" )
1216 if _ , err := os .Stat (tokenFullPath ); err != nil {
@@ -33,7 +37,6 @@ func createAdminToken() (string, error) {
3337}
3438
3539func ClientConfig (t * testing.T ) (string , string ) {
36- addr := "127.0.0.1:1234"
3740 home , err := os .UserHomeDir ()
3841 if err != nil {
3942 panic (err )
@@ -42,7 +45,11 @@ func ClientConfig(t *testing.T) (string, string) {
4245 authToken , err := GetLotusToken (path )
4346 checkErr (t , err )
4447
45- return addr , authToken
48+ return defaultAddr , authToken
49+ }
50+
51+ func getDefaultAddr () string {
52+ return defaultAddr
4653}
4754
4855func checkErr (t * testing.T , err error ) {
You can’t perform that action at this time.
0 commit comments