github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/libnetwork/cmd/networkdb-test/README (about)

     1  SERVER
     2  
     3  cd test/networkdb
     4  env GOOS=linux go build -v testMain.go && docker build -t dockereng/e2e-networkdb .
     5  (only for testkit case) docker push dockereng/e2e-networkdb
     6  
     7  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
     8  
     9  CLIENT
    10  
    11  cd test/networkdb
    12  Join cluster: docker run -it --network net1 dockereng/e2e-networkdb client join testdb 8000
    13  Join network: docker run -it --network net1 dockereng/e2e-networkdb client join-network testdb 8000 test
    14  Run test: docker run -it --network net1 dockereng/e2e-networkdb client write-delete-unique-keys testdb 8000 test tableBla 3 10
    15  check table: curl "localhost:32768/gettable?nid=test&tname=table_name"