diff --git a/.github/workflows/gf.yml b/.github/workflows/gf.yml index f797d9c3a..271306a83 100644 --- a/.github/workflows/gf.yml +++ b/.github/workflows/gf.yml @@ -108,6 +108,7 @@ jobs: ports: - 8090:8090 - 8091:8091 + - 8093:8093 # Oracle 11g server oracle-server: diff --git a/contrib/config/polaris/polaris_test.go b/contrib/config/polaris/polaris_test.go deleted file mode 100644 index 9c13d0c0a..000000000 --- a/contrib/config/polaris/polaris_test.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved. -// -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, -// You can obtain one at https://github.com/gogf/gf. - -package polaris_test - -import ( - "fmt" - "testing" - - "github.com/gogf/gf/contrib/config/polaris/v2" - "github.com/gogf/gf/v2/frame/g" - "github.com/gogf/gf/v2/os/gctx" - "github.com/gogf/gf/v2/test/gtest" - "github.com/gogf/gf/v2/util/guid" -) - -var ( - ctx = gctx.GetInitCtx() - namespace = "default" - fileGroup = "goframe" - fileName = "config.yaml" - path = "testdata/polaris.yaml" - logDir = "/tmp/polaris/log" -) - -func TestPolaris(t *testing.T) { - gtest.C(t, func(t *gtest.T) { - adapter, err := polaris.New(ctx, polaris.Config{ - Namespace: namespace, - FileGroup: fileGroup, - FileName: fileName, - Path: path, - LogDir: logDir, - Watch: true, - }) - t.AssertNil(err) - config := g.Cfg(guid.S()) - config.SetAdapter(adapter) - - fmt.Println(adapter.Get(ctx, "server.address")) - - t.Assert(config.Available(ctx), true) - t.Assert(config.Available(ctx, "non-exist"), false) - - v, err := config.Get(ctx, `server.address`) - t.AssertNil(err) - t.Assert(v.String(), ":8000") - - m, err := config.Data(ctx) - t.AssertNil(err) - t.AssertGT(len(m), 0) - }) -} diff --git a/contrib/config/polaris/testdata/polaris.yaml b/contrib/config/polaris/testdata/polaris.yaml deleted file mode 100644 index 9f785c233..000000000 --- a/contrib/config/polaris/testdata/polaris.yaml +++ /dev/null @@ -1,11 +0,0 @@ -global: - serverConnector: - addresses: - - 183.47.111.80:8091 -config: - configConnector: - addresses: - - 183.47.111.80:8093 -consumer: - localCache: - persistDir: "/tmp/polaris/backup" \ No newline at end of file