diff --git a/.github/workflows/taoskeeper-ci.yml b/.github/workflows/taoskeeper-ci-build.yml similarity index 95% rename from .github/workflows/taoskeeper-ci.yml rename to .github/workflows/taoskeeper-ci-build.yml index 7f84eaa401..71bb1c9a51 100644 --- a/.github/workflows/taoskeeper-ci.yml +++ b/.github/workflows/taoskeeper-ci-build.yml @@ -1,4 +1,4 @@ -name: taosKeeper CI +name: taosKeeper Build on: push: @@ -8,7 +8,7 @@ on: jobs: build: runs-on: ubuntu-latest - name: Run unit tests + name: Build and test on ubuntu-latest steps: - name: Checkout the repository diff --git a/tools/keeper/process/handle.go b/tools/keeper/process/handle.go index 980902daca..ea02dd91f3 100644 --- a/tools/keeper/process/handle.go +++ b/tools/keeper/process/handle.go @@ -411,9 +411,11 @@ func (p *Processor) Prepare() { func (p *Processor) withDBName(tableName string) string { b := pool.BytesPoolGet() + b.WriteByte('`') b.WriteString(p.db) - b.WriteByte('.') + b.WriteString("`.`") b.WriteString(tableName) + b.WriteByte('`') return b.String() } diff --git a/tools/keeper/process/handle_test.go b/tools/keeper/process/handle_test.go index bfd5c369b4..55f469eabb 100644 --- a/tools/keeper/process/handle_test.go +++ b/tools/keeper/process/handle_test.go @@ -119,3 +119,9 @@ func Test_getStatusStr(t *testing.T) { assert.Equal(t, tt.expected, res) } } + +func Test_withDBName(t *testing.T) { + processor := &Processor{db: "db"} + res := processor.withDBName("test") + assert.Equal(t, res, "`db`.`test`") +} diff --git a/tools/keeper/util/empty_test.go b/tools/keeper/util/empty_test.go index 5d82866721..b38609ec73 100644 --- a/tools/keeper/util/empty_test.go +++ b/tools/keeper/util/empty_test.go @@ -1,8 +1,6 @@ package util -import ( - "testing" -) +import "testing" func TestEmpty(t *testing.T) { }