Skip to content

Commit

Permalink
Fix test for backport
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 c0ea3fd
Show file tree
Hide file tree
Showing 11 changed files with 194 additions and 408 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
26 changes: 16 additions & 10 deletions .github/workflows/ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ concurrency:
cancel-in-progress: true

jobs:

semgrep-static-code-analysis:
timeout-minutes: 30
name: "semgrep checks"
Expand Down Expand Up @@ -128,12 +127,6 @@ 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 }}-binary-${{ github.run_id }}
- uses: actions/cache@v3
id: assets-cache
name: Assets Cache
Expand All @@ -147,6 +140,12 @@ jobs:
GOOS: linux
run: |
make binary
- uses: actions/cache/save@v3
name: Save Operator Binary
with:
path: |
./minio-operator
key: ${{ runner.os }}-ui-binary-${{ github.run_id }}



Expand Down Expand Up @@ -200,7 +199,7 @@ jobs:
with:
path: |
./minio-operator
key: ${{ runner.os }}-binary-${{ github.run_id }}
key: ${{ runner.os }}-ui-binary-${{ github.run_id }}

# Runs a set of commands using the runners shell
- name: Start Kind for Operator UI
Expand Down Expand Up @@ -237,7 +236,7 @@ jobs:
with:
path: |
./minio-operator
key: ${{ runner.os }}-binary-${{ github.run_id }}
key: ${{ runner.os }}-ui-binary-${{ github.run_id }}

# Runs a set of commands using the runners shell
- name: Start Kind for Operator UI
Expand Down Expand Up @@ -311,6 +310,7 @@ jobs:
- ui-assets
- reuse-golang-dependencies
- semgrep-static-code-analysis
- compile-binary
runs-on: ubuntu-latest

strategy:
Expand All @@ -327,13 +327,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
3 changes: 1 addition & 2 deletions web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/traverse": "7.24.5",
"@reduxjs/toolkit": "1.9.7",
"ip": "2.0.1",
"kbar": "^0.1.0-beta.39",
"local-storage-fallback": "^4.1.1",
"lodash": "^4.17.21",
Expand Down Expand Up @@ -71,7 +70,7 @@
"@types/websocket": "^1.0.0",
"prettier": "3.2.5",
"react-scripts": "5.0.1",
"testcafe": "2.6.2",
"testcafe": "3.6.2",
"ts-prune": "^0.10.3",
"typescript": "^4.4.3"
},
Expand Down
9 changes: 6 additions & 3 deletions web-app/tests/scripts/operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
# # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

SCRIPT_DIR=$(dirname "$0")
WEBAPP_SCRIPT_DIR=$(dirname "$0")
export WEBAPP_SCRIPT_DIR
source "${WEBAPP_SCRIPT_DIR}/common.sh" # This is common.sh for TestCafe Tests

SCRIPT_DIR="$GITHUB_WORKSPACE/testing"
export SCRIPT_DIR
source "${SCRIPT_DIR}/common.sh" # This is common.sh for TestCafe Tests
source "${GITHUB_WORKSPACE}/tests/common.sh" # This is common.sh for k8s tests.
source "${SCRIPT_DIR}/common.sh" # This is common.sh for k8s tests.

## this enables :dev tag for minio/operator container image.
CI="true"
Expand Down
Loading

0 comments on commit c0ea3fd

Please sign in to comment.