github.com/chasestarr/deis@v1.13.5-0.20170519182049-1d9e59fbdbfc/tests/bin/test-smoke.sh (about)

     1  #!/usr/bin/env bash
     2  #
     3  # Preps a test environment and runs `make test-smoke`
     4  # against artifacts produced from the current source tree
     5  #
     6  
     7  # fail on any command exiting non-zero
     8  set -eo pipefail
     9  
    10  # absolute path to current directory
    11  export THIS_DIR=$(cd $(dirname $0); pwd)
    12  
    13  # setup the test environment
    14  source $THIS_DIR/test-setup.sh
    15  
    16  # setup callbacks on process exit and error
    17  trap cleanup EXIT
    18  trap dump_logs ERR
    19  
    20  log_phase "Running documentation tests"
    21  
    22  # test building documentation
    23  make -C docs/ test
    24  
    25  log_phase "Running unit tests"
    26  
    27  make test-unit
    28  
    29  log_phase "Building from current source tree"
    30  
    31  # build all docker images and client binaries
    32  make build
    33  
    34  # use the built client binaries
    35  export PATH=$DEIS_ROOT/deisctl:$DEIS_ROOT/client/dist:$PATH
    36  
    37  log_phase "Running functional tests"
    38  
    39  make test-functional
    40  
    41  log_phase "Provisioning 3-node CoreOS"
    42  
    43  export DEIS_NUM_INSTANCES=3
    44  make discovery-url
    45  vagrant up --provider virtualbox
    46  
    47  log_phase "Waiting for etcd/fleet"
    48  
    49  until deisctl list >/dev/null 2>&1; do
    50      sleep 1
    51  done
    52  
    53  log_phase "Publishing release from source tree"
    54  
    55  make dev-release
    56  
    57  log_phase "Provisioning Deis"
    58  
    59  # configure platform settings
    60  deisctl config platform set domain=$DEIS_TEST_DOMAIN
    61  deisctl config platform set sshPrivateKey=$DEIS_TEST_SSH_KEY
    62  
    63  time deisctl install platform
    64  time deisctl start platform
    65  
    66  log_phase "Starting smoke tests"
    67  
    68  time make test-smoke