build docker image in host OS
Use CentOS as test env
Image name is hyperhq/hypercli-auto-test:dev
// run in dir hypercli/integration-cli on host os
$ ./util.sh build-dev
make hyper cli
build hyper cli binary from source code
// run in dir hypercli/integration-cli on host os
$ ./util.sh make
enter container
update ACCESS_KEY and SECRET_KEY in integration-cli/util.conf
// run in dir hypercli/integration-cli on host os
$ ./util.sh enter
run test in container
$ ./util.sh test all
Run test on localhost for dev
prepare
// ensure hyperhq and docker dir
mkdir -p $GOPATH/src/github.com/{hyperhq,docker}
// clone and build hypercli
cd $GOPATH/src/github.com/hyperhq
git clone git@github.com:hyperhq/hypercli.git
cd hypercli
./build.sh
// copy hyper binary to /usr/bin/hyper
sudo cp hyper/hyper /usr/bin/hyper
// create link
cd $GOPATH/src/github.com/docker
ln -s ../hyperhq/hypercli docker
// generate util.conf
$ cd $GOPATH/src/github.com/hyperhq/hypercli
$ git checkout integration-test
$ cd integration-cli
$ ./util.sh
// config util.conf
$ vi util.conf
ACCESS_KEY="<hyper access key>"
SECRET_KEY="<hyper secret key>"
run test case
// run all test cases
$ ./util.sh test all
// run test case with timeout
$ ./util.sh test all -timout 20m
// run specified test case
$ ./util.sh test -check.f ^TestCliLoadFromLocalTar$
// run test cases start with specified prefix
$ ./util.sh test -check.f TestCliLoadFromLocalTar
// combined use
$ ./util.sh test -check.f 'TestCliLoadFromLocalTarEmpty|TestCliLoadFromLocalPullAndLoad' -timeout 20m
Run test in docker container for qa
build docker image for qa
build docker image in host OS
Use CentOS as test env
Image name is hyperhq/hypercli-auto-test:qa
// run in dir hypercli/integration-cli on host os
$ ./util.sh build-qa