1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libnetwork/cmd/networkdb-test
Eng Zer Jun c55a4ac779
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-08-27 14:56:57 +08:00
..
dbclient refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
dbserver Fix libnetwork imports 2021-06-01 21:51:23 +00:00
dummyclient Fixup libnetwork lint errors 2021-06-01 23:48:32 +00:00
Dockerfile Enable network-db test image creation 2018-05-29 08:03:32 -07:00
README Enable network-db test image creation 2018-05-29 08:03:32 -07:00
testMain.go Fix libnetwork imports 2021-06-01 21:51:23 +00:00

SERVER

cd test/networkdb
env GOOS=linux go build -v testMain.go && docker build -t dockereng/e2e-networkdb .
(only for testkit case) docker push dockereng/e2e-networkdb

Run server: docker service create --name testdb --network net1 --replicas 3 --env TASK_ID="{{.Task.ID}}" -p mode=host,target=8000 dockereng/e2e-networkdb server 8000

CLIENT

cd test/networkdb
Join cluster: docker run -it --network net1 dockereng/e2e-networkdb client join testdb 8000
Join network: docker run -it --network net1 dockereng/e2e-networkdb client join-network testdb 8000 test
Run test: docker run -it --network net1 dockereng/e2e-networkdb client write-delete-unique-keys testdb 8000 test tableBla 3 10
check table: curl "localhost:32768/gettable?nid=test&tname=table_name"