Skip to content

Commit

Permalink
Fix tests for backported versions of Operator 5.0.x
Browse files Browse the repository at this point in the history
Signed-off-by: pjuarezd <[email protected]>
  • Loading branch information
pjuarezd committed Aug 14, 2024
1 parent 560164a commit 1a678e2
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 139 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kubernetes-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
key: ${{ runner.os }}-binary-${{ github.run_id }}
- name: Tenant upgrade test on Kind
run: |
"${GITHUB_WORKSPACE}/testing/deploy-tenant-upgrade.sh"
"${GITHUB_WORKSPACE}/testing/deploy-tenant-upgrade.sh" "5.0.16"
test-kes:
timeout-minutes: 30
runs-on: ${{ matrix.os }}
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ concurrency:
cancel-in-progress: true

jobs:
operator:
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.21.x ]
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/cache@v3
name: Operator Binary Cache
with:
path: |
./minio-operator
key: ${{ runner.os }}-ui-binary-${{ github.run_id }}
- name: Operator Binary
run: |
make operator
semgrep-static-code-analysis:
timeout-minutes: 30
Expand Down Expand Up @@ -311,6 +332,7 @@ jobs:
- ui-assets
- reuse-golang-dependencies
- semgrep-static-code-analysis
- operator
runs-on: ubuntu-latest

strategy:
Expand All @@ -327,13 +349,19 @@ jobs:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- uses: actions/cache@v3
name: Operator Binary Cache
with:
path: |
./minio-operator
key: ${{ runner.os }}-ui-binary-${{ github.run_id }}

- name: Operator API Tests
run: |
curl -sLO "https://dl.k8s.io/release/v1.23.1/bin/linux/amd64/kubectl" -o kubectl
chmod +x kubectl
mv kubectl /usr/local/bin
"${GITHUB_WORKSPACE}/tests/start-tests-tenant.sh"
"${GITHUB_WORKSPACE}/testing/start-tests-tenant.sh"
echo "start ---> make test-operator-integration";
make test-operator-integration;
Expand Down
6 changes: 4 additions & 2 deletions testing/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ function check_tenant_status() {
function install_cert_manager_tenant() {

echo "Install cert-manager tenant from our example:"
try kubectl apply -k github.com/minio/operator/examples/kustomization/tenant-certmanager
try kubectl apply -k "${SCRIPT_DIR}/../examples/kustomization/tenant-certmanager"

echo "Wait until tenant-certmanager-tls secret is generated by cert-manager..."
while ! kubectl get secret tenant-certmanager-tls --namespace tenant-certmanager
Expand Down Expand Up @@ -816,7 +816,9 @@ function install_tenant() {
value=myminio
echo "Installing lite tenant for version $1"

try kubectl apply -k "github.com/minio/operator/testing/tenant\?ref\=$1"
tenant_version="v${1}"

try kubectl apply -k "github.com/minio/operator/testing/tenant?ref=$tenant_version"
fi

echo "Waiting for the tenant statefulset, this indicates the tenant is being fulfilled"
Expand Down
File renamed without changes.
File renamed without changes.
132 changes: 0 additions & 132 deletions tests/common.sh

This file was deleted.

4 changes: 2 additions & 2 deletions web-app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ default: build-static
build-static:
@echo "Building frontend static assets to 'build'"
@if [ -f "${NVM_DIR}/nvm.sh" ]; then \. "${NVM_DIR}/nvm.sh" && nvm install && nvm use; fi && \
NODE_OPTIONS=--openssl-legacy-provider yarn build
yarn build

test-warnings:
test-warnings build-static:
./check-warnings.sh

test-prettier:
Expand Down
2 changes: 1 addition & 1 deletion web-app/check-warnings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ die() {
try() { "$@" &> yarn.log || die "cannot $*"; }

rm -f yarn.log
try make build-static
try yarn build

if grep "Compiled with warnings" yarn.log; then
echo "There are warnings in the code"
Expand Down

0 comments on commit 1a678e2

Please sign in to comment.