Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 091e281

Browse files
committed
[fix-integration-test] update doc for integration test
1 parent 443d696 commit 091e281

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

integration-cli/README.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Functional test for hyper cli.
3131
- [run test in docker container](#run-test-in-docker-container)
3232
- [run test via util.sh](#run-test-via-utilsh)
3333
- [run test via docker cli](#run-test-via-docker-cli)
34+
- [run test via hyper cli](#run-test-via-hyper-cli)
3435

3536
<!-- /TOC -->
3637

@@ -332,20 +333,27 @@ $ ./util.sh qa "#222"
332333

333334
#### run test via docker cli
334335

335-
> ACCESS_KEY and SECRET_KEY are required
336+
Required parameters:
337+
338+
`APIROUTER`: apirouter entrypoint
339+
`REGION`: could be us-west-1(zl2), eu-central-1(eu1), RegionOne(packet)
340+
`ACCESS_KEY`,`SECRET_KEY`: Hyper credential for test
341+
`BRANCH`: hyper cli branch name or PR number
336342

337343
```
338-
//test `master` branch with `zenlayer` apirouter
339-
$ export ACCESS_KEY="xxxxxxxx"
340-
$ export SECRET_KEY="xxxxxxxxxxxxxxxxxxxx"
344+
//test `master` branch of hypercli with `eu-west-1` apirouter
341345
$ docker run -it --rm \
342346
-e ACCESS_KEY=${ACCESS_KEY} \
343347
-e SECRET_KEY=${SECRET_KEY} \
348+
-e DOCKER_HOST=tcp://us-west-1.hyper.sh:443 \
349+
-e REGION=us-west-1 \
350+
-e BRANCH=master \
344351
hyperhq/hypercli-auto-test:qa go test -check.f TestCli -timeout 180m
345352
346-
347353
//test `specified PR`
348354
$ docker run -it --rm \
355+
-e DOCKER_HOST=${APIROUTER} \
356+
-e REGION=${REGION} \
349357
-e ACCESS_KEY=${ACCESS_KEY} \
350358
-e SECRET_KEY=${SECRET_KEY} \
351359
-e BRANCH="#221" \
@@ -354,40 +362,47 @@ $ docker run -it --rm \
354362
355363
//test `specified case name`
356364
$ docker run -it --rm \
365+
-e DOCKER_HOST=${APIROUTER} \
366+
-e REGION=${REGION} \
357367
-e ACCESS_KEY="${ACCESS_KEY}" \
358368
-e SECRET_KEY="${SECRET_KEY}" \
369+
-e BRANCH=${BRANCH} \
359370
hyperhq/hypercli-auto-test:qa go test -check.f 'TestCliInfo|TestCliFip' -timeout 180m
360371
361372
362-
//test `specified branch` with `packet` apirouter
373+
//test with `packet` apirouter
363374
$ docker run -it --rm \
364375
-e ACCESS_KEY=${ACCESS_KEY} \
365376
-e SECRET_KEY=${SECRET_KEY} \
366-
-e BRANCH=integration-test \
377+
-e BRANCH=${BRANCH} \
367378
-e DOCKER_HOST=tcp://147.75.x.x:6443 \
379+
-e REGION=RegionOne \
368380
hyperhq/hypercli-auto-test:qa go test -check.f TestCli -timeout 180m
369381
370382
371383
//test with http proxy
372384
$ docker run -it --rm \
385+
-e DOCKER_HOST=${APIROUTER} \
386+
-e REGION=${REGION} \
373387
-e ACCESS_KEY=${ACCESS_KEY} \
374388
-e SECRET_KEY=${SECRET_KEY} \
389+
-e BRANCH=${BRANCH} \
375390
-e http_proxy=${http_proxy} \
376391
-e https_proxy=${https_proxy} \
377392
hyperhq/hypercli-auto-test:qa go test -check.f TestCliInfo
378393
379-
//test with region(region name could be us-west-1/eu-central-1)
380-
$ docker run -it --rm \
381-
-e ACCESS_KEY=${ACCESS_KEY} \
382-
-e SECRET_KEY=${SECRET_KEY} \
383-
-e REGION=${REGION} \
384-
-e http_proxy=${http_proxy} \
385-
-e https_proxy=${https_proxy} \
386-
hyperhq/hypercli-auto-test:qa go test -check.f TestCliInfo
387394
388395
//test basic test case only
389396
$ docker run -it --rm \
397+
-e DOCKER_HOST=${APIROUTER} \
398+
-e REGION=${REGION} \
390399
-e ACCESS_KEY=${ACCESS_KEY} \
391400
-e SECRET_KEY=${SECRET_KEY} \
401+
-e BRANCH=${BRANCH} \
392402
hyperhq/hypercli-auto-test:qa go test -check.f "TestCli.*Basic" -timeout 180m
403+
393404
```
405+
406+
#### run test via hyper cli
407+
408+
Just replace `docker` with `hyper` in command line.

0 commit comments

Comments
 (0)