Skip to content

Commit

Permalink
ci: upgrade version (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
baerwang committed Nov 13, 2023
1 parent 2c4be46 commit 7ec3e34
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://go.dev/dl/go1.18.3.linux-amd64.tar.gz"
goversion: "https://go.dev/dl/go1.20.11.linux-amd64.tar.gz"
project_path: "./cmd/arana"
binary_name: "arana"
2 changes: 1 addition & 1 deletion cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func Start(bootstrapConfigPath string) {
discovery := boot.NewDiscovery(bootstrapConfigPath)

if err := boot.Boot(context.Background(), discovery); err != nil {
log.Fatal("start failed: %v", err)
log.Fatalf("start failed: %v", err)
return
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/config/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func TestInit(t *testing.T) {
wantErr assert.ErrorAssertionFunc
}{
{"Init_1", args{"file", config.Options{}}, assert.Error},
{"Init_2", args{"", config.Options{}}, assert.NoError},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -105,7 +106,8 @@ func Test_Init(t *testing.T) {
err := config.InitStoreOperate(options)
assert.Error(t, err)

config.Register(mockFileStore)
err = config.Register(mockFileStore)
assert.NoError(t, err)
err = config.InitStoreOperate(options)
assert.NoError(t, err)

Expand Down
5 changes: 3 additions & 2 deletions pkg/config/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
)

import (
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
)

Expand Down Expand Up @@ -388,9 +389,9 @@ func Test_storeOperate_initContentsMap(t *testing.T) {
contents: tt.fields.contents,
}

s.Init(map[string]interface{}{
assert.NoError(t, s.Init(map[string]interface{}{
"content": yamlConfig,
})
}))

cfg := new(config.Configuration)
_ = yaml.Unmarshal([]byte(tt.args.val), cfg)
Expand Down

0 comments on commit 7ec3e34

Please sign in to comment.