-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Against Multiple Vault Versions (#274)
* Clarify desired CI coverage for Vault versions * Update CI tooling to cover multiple Vault versions * Add utils to help skip tests when needed * Fix broken root_token logic from previous refactor * Add skipIf calls where needed for different Vault vers * Better ordering * Bump dist to xenial for good measure
- Loading branch information
Showing
10 changed files
with
189 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,80 @@ | ||
dist: trusty | ||
dist: xenial | ||
sudo: false | ||
language: python | ||
matrix: | ||
include: | ||
- python: '2.7' | ||
env: TOXENV=py27 VAULT_BRANCH=release | ||
- python: '2.7' | ||
env: TOXENV=py27-flake8 VAULT_BRANCH=release | ||
- python: '3.6' | ||
env: TOXENV=py36 VAULT_BRANCH=release | ||
- python: '3.6' | ||
env: TOXENV=py36-flake8 VAULT_BRANCH=release | ||
- python: '3.6' | ||
env: TOXENV=py36 VAULT_BRANCH=head | ||
- name: 'Python v2.7, Vault v0.8.3 - Integration/Unit Tests' | ||
python: '2.7' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=0.8.3 | ||
- name: 'Python v2.7, Vault v0.9.6 - Integration/Unit Tests' | ||
python: '2.7' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=0.9.6 | ||
- name: 'Python v2.7, Vault v0.10.4 - Integration/Unit Tests' | ||
python: '2.7' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=0.10.4 | ||
- name: 'Python v2.7, Vault v0.11.1 - Integration/Unit Tests' | ||
python: '2.7' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=0.11.1 | ||
- name: 'Python v2.7, Vault HEAD ref - Integration/Unit Tests' | ||
python: '2.7' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=HEAD | ||
- name: 'Python v2.7 - Linting (flake8)' | ||
python: '2.7' | ||
env: | ||
- TOXENV=py27-flake8 | ||
- name: 'Python v3.6, Vault v0.8.3 - Integration/Unit Tests' | ||
python: '3.6' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=0.8.3 | ||
- name: 'Python v3.6, Vault v0.9.6 - Integration/Unit Tests' | ||
python: '3.6' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=0.9.6 | ||
- name: 'Python v3.6, Vault v0.10.4 - Integration/Unit Tests' | ||
python: '3.6' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=0.10.4 | ||
- name: 'Python v3.6, Vault v0.11.1 - Integration/Unit Tests' | ||
python: '3.6' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=0.11.1 | ||
- name: 'Python v3.6, Vault HEAD ref - Integration/Unit Tests' | ||
python: '3.6' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=HEAD | ||
- name: 'Python v3.6 - Linting (flake8)' | ||
python: '3.6' | ||
env: | ||
- TOXENV=py27-flake8 | ||
allow_failures: | ||
- python: '3.6' | ||
env: TOXENV=py36 VAULT_BRANCH=head | ||
- name: 'Python v2.7, Vault HEAD ref - Integration/Unit Tests' | ||
python: '2.7' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=HEAD | ||
- name: 'Python v3.6, Vault HEAD ref - Integration/Unit Tests' | ||
python: '3.6' | ||
env: | ||
- TOXENV=py27 | ||
- VAULT_VERSION=HEAD | ||
install: | ||
- scripts/install-vault-${VAULT_BRANCH}.sh | ||
- pip install tox | ||
- scripts/install-vault.sh ${VAULT_VERSION} | ||
- pip install tox | ||
script: | ||
- export PATH=$HOME/bin:$PATH | ||
- make test | ||
- export PATH=$HOME/bin:$PATH | ||
- make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
hvac/tests/integration_tests/api/secrets_engines/test_kv_v2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
set -eux | ||
|
||
DEFAULT_VAULT_VERSION=0.11.1 | ||
VAULT_VERSION=${1:-$DEFAULT_VAULT_VERSION} | ||
|
||
function build_and_install_vault_head_ref() { | ||
mkdir -p $HOME/bin | ||
|
||
eval "$(GIMME_GO_VERSION=1.10.3 gimme)" | ||
|
||
export GOPATH=$HOME/go | ||
mkdir $GOPATH | ||
|
||
export PATH=$GOPATH/bin:$PATH | ||
|
||
go get github.com/tools/godep | ||
go get github.com/mitchellh/gox | ||
|
||
git clone https://github.com/hashicorp/vault.git $GOPATH/src/github.com/hashicorp/vault | ||
cd $GOPATH/src/github.com/hashicorp/vault | ||
make dev | ||
|
||
mv bin/vault $HOME/bin | ||
} | ||
|
||
function install_vault_release() { | ||
mkdir -p $HOME/bin | ||
|
||
cd /tmp | ||
|
||
curl -sOL https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip | ||
unzip vault_${VAULT_VERSION}_linux_amd64.zip | ||
mv vault $HOME/bin | ||
} | ||
|
||
if [[ "$(tr [A-Z] [a-z] <<<"$VAULT_VERSION")" == "head" ]]; then | ||
build_and_install_vault_head_ref | ||
else | ||
install_vault_release | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters