Skip to content

Commit 7d1ad6b

Browse files
committed
tests: unexport default addr
Signed-off-by: jsign <jsign.uy@gmail.com>
1 parent 1782b47 commit 7d1ad6b

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/auth.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import (
77
"testing"
88
)
99

10+
const (
11+
defaultAddr = "127.0.0.1:1234"
12+
)
13+
1014
func 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

3539
func 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

4855
func checkErr(t *testing.T, err error) {

0 commit comments

Comments
 (0)