Skip to content

Commit

Permalink
update test versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fishi0x01 committed May 11, 2024
1 parent 7135d47 commit e31b3c6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ get-bats: ## Download bats dependencies to test directory
mkdir -p test/bin/plugins/bats-assert
mkdir -p test/bin/plugins/bats-support
mkdir -p test/bin/plugins/bats-file
curl -sL https://github.com/bats-core/bats-core/archive/v1.2.0.tar.gz | tar xvz --strip 1 -C test/bin/core
curl -sL https://github.com/bats-core/bats-assert/archive/v2.0.0.tar.gz | tar xvz --strip 1 -C test/bin/plugins/bats-assert
curl -sL https://github.com/bats-core/bats-core/archive/v1.11.0.tar.gz | tar xvz --strip 1 -C test/bin/core
curl -sL https://github.com/bats-core/bats-assert/archive/v2.1.0.tar.gz | tar xvz --strip 1 -C test/bin/plugins/bats-assert
curl -sL https://github.com/bats-core/bats-support/archive/v0.3.0.tar.gz | tar xvz --strip 1 -C test/bin/plugins/bats-support
curl -sL https://github.com/bats-core/bats-file/archive/v0.2.0.tar.gz | tar xvz --strip 1 -C test/bin/plugins/bats-file
curl -sL https://github.com/bats-core/bats-file/archive/v0.4.0.tar.gz | tar xvz --strip 1 -C test/bin/plugins/bats-file

integration-tests: ## Run integration test suites (requires bats - see get-bats)
test/run-all-tests.sh
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ Working on vault secrets can be critical, making quality and correct behavior a
That being said, `vsh` is still a small open source project, meaning we cannot give any guarantees.
However, we put strong emphasis on test-driven development.
Every PR is tested with an extensive [suite](test/suites) of integration tests.
Vast majority of tests run on KV1 and KV2 and every test runs against vault `1.0.0` and `1.12.3`, i.e., vault versions in between should also be compatible.
Vast majority of tests run on KV1 and KV2 and every test runs against vault `1.13.4` and `1.16.2`, i.e., vault versions in between are likely to be compatible too.

:warning: In general, using `vsh` is at your own risk. We do not hold any responsibility and do not give any guarantees.

## Contributions

Expand Down
2 changes: 1 addition & 1 deletion test/run-all-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e # required to fail test suite when a single test fails

VAULT_VERSIONS=("1.12.3" "1.0.0")
VAULT_VERSIONS=("1.16.2" "1.13.4")
KV_BACKENDS=("KV1" "KV2")

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
Expand Down
2 changes: 1 addition & 1 deletion test/run-single-test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e # required to fail test suite when a single test fails

VAULT_VERSION=${VAULT_VERSION:-"1.12.3"}
VAULT_VERSION=${VAULT_VERSION:-"1.16.2"}
KV_BACKEND=${KV_BACKEND:-"KV2"}
TEST_SUITE=${TEST_SUITE:-"commands/cp"}

Expand Down
2 changes: 1 addition & 1 deletion test/util/common.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export VAULT_VERSION=${VAULT_VERSION:-"1.9.2"}
export VAULT_VERSION=${VAULT_VERSION:-"1.16.2"}
export VAULT_CONTAINER_NAME="vsh-integration-test-vault"
export VAULT_HOST_PORT=${VAULT_HOST_PORT:-"8888"}

Expand Down
2 changes: 1 addition & 1 deletion test/util/concurrency-setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ setup() {
-e "VAULT_TOKEN=root" \
-e "VAULT_DEV_ROOT_TOKEN_ID=root" \
-e "VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200" \
"vault:${VAULT_VERSION}" &> /dev/null
"hashicorp/vault:${VAULT_VERSION}" &> /dev/null
docker cp "$DIR/policy-no-root.hcl" ${VAULT_CONTAINER_NAME}:.
docker cp "$DIR/policy-delete-only.hcl" ${VAULT_CONTAINER_NAME}:.
# need some time for GH Actions CI
Expand Down
2 changes: 1 addition & 1 deletion test/util/standard-setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ setup() {
-e "VAULT_TOKEN=root" \
-e "VAULT_DEV_ROOT_TOKEN_ID=root" \
-e "VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200" \
"vault:${VAULT_VERSION}" &> /dev/null
"hashicorp/vault:${VAULT_VERSION}" &> /dev/null
docker cp "$DIR/policy-no-root.hcl" ${VAULT_CONTAINER_NAME}:.
docker cp "$DIR/policy-delete-only.hcl" ${VAULT_CONTAINER_NAME}:.
# need some time for GH Actions CI
Expand Down

0 comments on commit e31b3c6

Please sign in to comment.