Skip to content

Commit

Permalink
feat: add testcontainer as integration testing tool (arana-db#119)
Browse files Browse the repository at this point in the history
* add testcontainer test code.

* Debug testcontainer test code.

* Fixes SQL file path.

* Optimize test code.

* Refactor testcontainer code.

* add blank at end of file.

* Format code.

* Refactor code, add struct.

* Fixes code review problem.
  • Loading branch information
dongzl authored Apr 7, 2022
1 parent 4c2bac5 commit cc34f12
Show file tree
Hide file tree
Showing 5 changed files with 590 additions and 10 deletions.
4 changes: 3 additions & 1 deletion docker/scripts/sharding.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ END

DELIMITER ;
CALL sp_create_tab;
DROP PROCEDURE sp_create_tab;
DROP PROCEDURE sp_create_tab;

insert into student_0001 values (1, 1, 'scott', 95, 'nc_scott', 0, 16, now(), now());
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ require (
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/spf13/cobra v1.2.1
github.com/stretchr/testify v1.7.0
github.com/testcontainers/testcontainers-go v0.12.0
github.com/tidwall/gjson v1.14.0
go.etcd.io/etcd/server/v3 v3.5.0-alpha.0
go.uber.org/atomic v1.9.0
go.uber.org/zap v1.19.1
golang.org/x/net v0.0.0-20211105192438-b53810dc28af
golang.org/x/net v0.0.0-20211108170745-6635138e15ea
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
)
Loading

0 comments on commit cc34f12

Please sign in to comment.