diff --git a/internal/integration/base_test.go b/internal/integration/base_test.go index 769b416..e8537af 100644 --- a/internal/integration/base_test.go +++ b/internal/integration/base_test.go @@ -16,10 +16,12 @@ import ( var onceExampleServer sync.Once var onceServer sync.Once var shareEndpoint = "" + // "NWkbCslfh9ea2LjVIUsKehJuopPb65fn", "oVPNllSR1DfizdmdSF7wLjgABYbexdt4FZ1HWrI81dD5BeNhsyXpXPDFoDEyiSVe" var apiAddr = "http://127.0.0.1:12140" var accessKey = "NWkbCslfh9ea2LjVIUsKehJuopPb65fn" -var secret="oVPNllSR1DfizdmdSF7wLjgABYbexdt4FZ1HWrI81dD5BeNhsyXpXPDFoDEyiSVe" +var secret = "oVPNllSR1DfizdmdSF7wLjgABYbexdt4FZ1HWrI81dD5BeNhsyXpXPDFoDEyiSVe" + func runExampleServer() { onceExampleServer.Do(func() { // run example server @@ -36,9 +38,9 @@ func runExampleServer() { func RunTestServer() { log.Printf("run test server") onceServer.Do(func() { - env:="test" - if begonia.Env!=""{ - env=begonia.Env + env := "dev" + if begonia.Env != "" { + env = begonia.Env } config := config.ReadConfig(env) go func() { diff --git a/internal/integration/file_test.go b/internal/integration/file_test.go index 8963598..b630702 100644 --- a/internal/integration/file_test.go +++ b/internal/integration/file_test.go @@ -13,6 +13,7 @@ import ( "runtime" "testing" + "github.com/begonia-org/begonia" "github.com/begonia-org/begonia/config" cfg "github.com/begonia-org/begonia/internal/pkg/config" "github.com/begonia-org/go-sdk/client" @@ -47,7 +48,7 @@ func upload(t *testing.T) { c.So(err, c.ShouldBeNil) c.So(rsp.StatusCode, c.ShouldEqual, common.Code_OK) c.So(rsp.Uri, c.ShouldNotBeEmpty) - conf := cfg.NewConfig(config.ReadConfig("dev")) + conf := cfg.NewConfig(config.ReadConfig(begonia.Env)) saveDir := filepath.Join(conf.GetUploadDir(), filepath.Dir(rsp.Uri)) filename = filepath.Base(rsp.Uri)