fix space issues for e2e test
This commit is contained in:
parent
3e9c10d37a
commit
dc15be12e3
|
|
@ -21,5 +21,12 @@ jobs:
|
||||||
run: make codegen
|
run: make codegen
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: make test
|
run: make test
|
||||||
|
- name: Pre-pull heavy images directly on Kind nodes
|
||||||
|
run: |
|
||||||
|
FOR_NODE=$(kind get nodes --name postgres-operator-e2e-tests 2>/dev/null || true)
|
||||||
|
for node in $FOR_NODE; do
|
||||||
|
echo "Pulling Spilo image on node $node..."
|
||||||
|
docker exec "$node" crictl pull ghcr.io/zalando/spilo-18:4.1-p2
|
||||||
|
done
|
||||||
- name: Run end-2-end tests
|
- name: Run end-2-end tests
|
||||||
run: make e2e
|
run: make e2e
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ jobs:
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: go test -race -covermode atomic -coverprofile=coverage.out ./...
|
run: go test -race -covermode atomic -coverprofile=coverage.out ./...
|
||||||
- name: Convert coverage to lcov
|
- name: Convert coverage to lcov
|
||||||
uses: jandelgado/gcov2lcov-action@v1.1.1
|
uses: jandelgado/gcov2lcov-action@v1.2.0
|
||||||
- name: Coveralls
|
- name: Coveralls
|
||||||
uses: coverallsapp/github-action@master
|
uses: coverallsapp/github-action@v2
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
path-to-lcov: coverage.lcov
|
file: coverage.lcov
|
||||||
|
|
|
||||||
15
e2e/run.sh
15
e2e/run.sh
|
|
@ -24,6 +24,15 @@ esac
|
||||||
echo "Clustername: ${cluster_name}"
|
echo "Clustername: ${cluster_name}"
|
||||||
echo "Kubeconfig path: ${kubeconfig_path}"
|
echo "Kubeconfig path: ${kubeconfig_path}"
|
||||||
|
|
||||||
|
# Helper function to pull images directly into kind nodes via crictl (bypasses host disk duplication)
|
||||||
|
function pull_on_kind_nodes() {
|
||||||
|
local img="$1"
|
||||||
|
echo "Pulling ${img} directly on kind nodes..."
|
||||||
|
for node in $(kind get nodes --name "${cluster_name}"); do
|
||||||
|
docker exec "$node" crictl pull "${img}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
function pull_images(){
|
function pull_images(){
|
||||||
operator_tag=$(git describe --tags --always --dirty)
|
operator_tag=$(git describe --tags --always --dirty)
|
||||||
components=("postgres-operator" "pooler")
|
components=("postgres-operator" "pooler")
|
||||||
|
|
@ -66,14 +75,14 @@ function start_kind(){
|
||||||
export KUBECONFIG="${kubeconfig_path}"
|
export KUBECONFIG="${kubeconfig_path}"
|
||||||
kind create cluster --name ${cluster_name} --config kind-cluster-postgres-operator-e2e-tests.yaml
|
kind create cluster --name ${cluster_name} --config kind-cluster-postgres-operator-e2e-tests.yaml
|
||||||
|
|
||||||
echo "Pulling Spilo image for platform ${PLATFORM}"
|
echo "Pulling Spilo image on kind nodes directly..."
|
||||||
docker pull --platform ${PLATFORM} "${spilo_image}"
|
pull_on_kind_nodes "${spilo_image}"
|
||||||
kind load docker-image "${spilo_image}" --name ${cluster_name}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function load_operator_images() {
|
function load_operator_images() {
|
||||||
echo "Loading operator images"
|
echo "Loading operator images"
|
||||||
export KUBECONFIG="${kubeconfig_path}"
|
export KUBECONFIG="${kubeconfig_path}"
|
||||||
|
# For locally built operator images, kind load is still fine since they're light
|
||||||
kind load docker-image "${operator_image}" --name ${cluster_name}
|
kind load docker-image "${operator_image}" --name ${cluster_name}
|
||||||
kind load docker-image "${pooler_image}" --name ${cluster_name}
|
kind load docker-image "${pooler_image}" --name ${cluster_name}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue