Skip to content

Commit

Permalink
fix readme, fix image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Volodkin committed Nov 2, 2023
1 parent f06f68a commit c71174d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ jobs:
export ACTION=install_driver
export CLUSTER_TYPE=kops
export IMAGE_NAME=${{ env.TMP_IMAGE_NAME }}
# export TAG=${{ env.COMMIT_ID }}
export TAG=bab31fd6a09bf568ffe7f2c6a82444ab9c4fbfe5
export TAG=${{ env.COMMIT_ID }}
tests/e2e-kubernetes/run.sh
- name: Run E2E Tests
run: |
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ test:
fmt:
go fmt ./...

.PHONY: e2e
e2e:
pushd tests/e2e-kubernetes; \
KUBECONFIG=${E2E_KUBECONFIG} go test -ginkgo.vv --bucket-region=${E2E_REGION} --commit-id=${E2E_COMMIT_ID}; \
EXIT_CODE=$$?; \
popd; \
exit $$EXIT_CODE

.PHONY: check_style
check_style:
test -z "$$(gofmt -d . | tee /dev/stderr)"
Expand Down
15 changes: 15 additions & 0 deletions tests/e2e-kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,24 @@ ACTION=delete_cluster CLUSTER_TYPE=kops tests/e2e-kubernetes/run.sh
```

## Running tests
### On cluster created by run.sh
`run_tests` command is expected to be executed from tests/e2e-kubernetes directory:
```bash
pushd tests/e2e-kubernetes
ACTION=run_tests CLUSTER_TYPE=kops TAG=v0.1.0 ./run.sh
popd
```

### On existing cluster
From repository root:
```
make e2e E2E_KUBECONFIG=~/.kube/config E2E_REGION=eu-west-1
```
> E2E_REGION specifies where to create bucket for test (should be the same as where cluster is located)
#### Prerequisites
- existing k8s cluster (e.g. EKS)
- `kubectl` in $PATH
- `kubeconfig` setting up access to k8s cluster
- driver deployed in the cluster
- aws credentials with access to s3 (create/delete buckets, read/write/list objects)
1 change: 1 addition & 0 deletions tests/e2e-kubernetes/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ K8S_VERSION_KOPS=${K8S_VERSION_KOPS:-${K8S_VERSION:-1.28.2}}

mkdir -p ${TEST_DIR}
mkdir -p ${BIN_DIR}
export PATH="$PATH:${BIN_DIR}"

function kubectl_install() {
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
Expand Down

0 comments on commit c71174d

Please sign in to comment.