Sha256: ea32d395faa5b0f1065a8328c3303d99d669a0f5728f35afb63083b9e8fbc734

Contents?: true

Size: 1.27 KB

Versions: 4

Compression:

Stored size: 1.27 KB

Contents

#!/bin/bash -e

function finish {
  echo 'Removing test environment'
  echo '---'
  docker-compose down --rmi 'local' --volumes
}

trap finish EXIT

function main() {
  # Generate reports folders locally
  mkdir -p spec/reports features/reports features_v4/reports

  startConjur
  runTests_5
  runTests_4
}

function startConjur() {
  echo 'Starting Conjur environment'
  echo '-----'
  docker-compose pull
  docker-compose build
  docker-compose up -d pg conjur_4 conjur_5
}

function runTests_5() {
  echo 'Waiting for Conjur v5 to come up, and configuring it...'
  ./ci/configure_v5.sh

  local api_key=$(docker-compose exec -T conjur_5 rake 'role:retrieve-key[cucumber:user:admin]')

  echo 'Running tests'
  echo '-----'
  docker-compose run --rm \
    -e CONJUR_AUTHN_API_KEY="$api_key" \
    tester_5 rake jenkins_init jenkins_spec jenkins_cucumber_v5
}

function runTests_4() {
  echo 'Waiting for Conjur v4 to come up, and configuring it...'
  ./ci/configure_v4.sh

  local api_key=$(docker-compose exec -T conjur_4 su conjur -c "conjur-plugin-service authn env RAILS_ENV=appliance rails r \"puts User['admin'].api_key\" 2>/dev/null")

  echo 'Running tests'
  echo '-----'
  docker-compose run --rm \
    -e CONJUR_AUTHN_API_KEY="$api_key" \
    tester_4 rake jenkins_cucumber_v4
}

main

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
conjur-api-5.3.0 test.sh
conjur-api-5.2.1 test.sh
conjur-api-5.2.0 test.sh
conjur-api-5.1.0 test.sh