Skip to content

Commit

Permalink
fix gf.yaml (#2385)
Browse files Browse the repository at this point in the history
* fix gf.yaml

* up
  • Loading branch information
gqcn authored Jan 3, 2023
1 parent 5884a0e commit 5a8b33f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ for file in `find . -name go.mod`; do
go mod tidy
go build ./...
go test ./... -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./...,github.com/gogf/gf/... || exit 1

if grep -q "/gogf/gf/.*/v2" go.mod; then
sed -i "s/gogf\/gf\(\/.*\)\/v2/gogf\/gf\/v2\1/g" coverage.out
fi

cd -
done
4 changes: 1 addition & 3 deletions .github/workflows/gf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ jobs:
run: bash .github/workflows/before_script.sh

- name: Build & Test
run: |
GOARCH=${{ matrix.goarch }}
bash .github/workflows/build_and_test.sh
run: bash .github/workflows/build_and_test.sh

- name: Stop Redis Cluster Containers
run: docker-compose -f ".github/workflows/redis/docker-compose.yml" down
Expand Down
6 changes: 3 additions & 3 deletions contrib/drivers/clickhouse/clickhouse_model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func Test_Model_Raw(t *testing.T) {

gtest.C(t, func(t *gtest.T) {
count, err := db.Model(table).Raw(fmt.Sprintf("select id from %s ", table)).Count()
t.Assert(count, int64(10))
t.Assert(count, 10)
t.AssertNil(err)
})

Expand Down Expand Up @@ -249,12 +249,12 @@ func Test_Model_Count(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
count, err := db.Model(table).Count()
t.AssertNil(err)
t.Assert(count, int64(TableSize))
t.Assert(count, TableSize)
})
gtest.C(t, func(t *gtest.T) {
count, err := db.Model(table).FieldsEx("id").Where("id>8").Count()
t.AssertNil(err)
t.Assert(count, int64(2))
t.Assert(count, 2)
})
}

Expand Down
8 changes: 4 additions & 4 deletions contrib/drivers/clickhouse/clickhouse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func TestDriverClickhouse_Insert(t *testing.T) {
gtest.AssertNil(err)
total, err = connect.Model("visits").Count()
gtest.AssertNil(err)
gtest.AssertEQ(total, int64(2))
gtest.AssertEQ(total, 2)
var list []*insertItem
for i := 0; i < 50; i++ {
list = append(list, &insertItem{
Expand All @@ -312,7 +312,7 @@ func TestDriverClickhouse_Insert(t *testing.T) {
gtest.AssertNil(err)
total, err = connect.Model("visits").Count()
gtest.AssertNil(err)
gtest.AssertEQ(total, int64(102))
gtest.AssertEQ(total, 102)
}

func TestDriverClickhouse_Insert_Use_Exec(t *testing.T) {
Expand Down Expand Up @@ -467,7 +467,7 @@ func TestDriverClickhouse_NilTime(t *testing.T) {
gtest.AssertNil(err)
count, err := connect.Model("data_type").Where("Col4", "Inc.").Count()
gtest.AssertNil(err)
gtest.AssertEQ(count, int64(10000))
gtest.AssertEQ(count, 10000)

data, err := connect.Model("data_type").Where("Col4", "Inc.").One()
gtest.AssertNil(err)
Expand Down Expand Up @@ -508,7 +508,7 @@ func TestDriverClickhouse_BatchInsert(t *testing.T) {
gtest.AssertNil(err)
count, err := connect.Model("data_type").Where("Col2", "ClickHouse").Where("Col3", "Inc").Count()
gtest.AssertNil(err)
gtest.AssertEQ(count, int64(10000))
gtest.AssertEQ(count, 10000)
}

func TestDriverClickhouse_Open(t *testing.T) {
Expand Down

0 comments on commit 5a8b33f

Please sign in to comment.