Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: upgrade version #799

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading