Skip to content

Commit 8198a3d

Browse files
removed cypress ui tests, remove npm and use yarn for zenko tests
Issue: ZENKO-5200
1 parent 32f7b4a commit 8198a3d

17 files changed

Lines changed: 130 additions & 17988 deletions

File tree

.github/scripts/end2end/run-e2e-test.sh

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ DESTINATION_SECRET_KEY=$(kubectl get secret "end2end-account-${CRR_DESTINATION_A
4747
DESTINATION_SESSION_TOKEN=$(kubectl get secret "end2end-account-${CRR_DESTINATION_ACCOUNT_NAME}" -o jsonpath='{.data.SessionToken}' | base64 -d)
4848
DESTINATION_ACCOUNT_ID=$(kubectl get secret "end2end-account-${CRR_DESTINATION_ACCOUNT_NAME}" -o jsonpath='{.data.AccountId}' | base64 -d)
4949
CRR_DESTINATION_INFO="{\"AccessKeyId\":\"${DESTINATION_ACCESS_KEY}\",\"SecretAccessKey\":\"${DESTINATION_SECRET_KEY}\",\"SessionToken\":\"${DESTINATION_SESSION_TOKEN}\",\"AccountId\":\"${DESTINATION_ACCOUNT_ID}\"}"
50-
OIDC_FULLNAME="${OIDC_FIRST_NAME} ${OIDC_LAST_NAME}"
5150
KEYCLOAK_TEST_USER="${OIDC_USERNAME}-norights"
5251
KEYCLOAK_TEST_PASSWORD=${OIDC_PASSWORD}
5352
KEYCLOAK_TEST_HOST=${OIDC_ENDPOINT}
@@ -77,12 +76,6 @@ run_e2e_test() {
7776
--env=VAULT_STS_ENDPOINT=${VAULT_STS_ENDPOINT} \
7877
--env=TOKEN=${TOKEN} \
7978
--env=STAGE=${STAGE} \
80-
--env=CYPRESS_KEYCLOAK_USER_FULLNAME="${OIDC_FULLNAME}" \
81-
--env=CYPRESS_KEYCLOAK_USERNAME=${OIDC_USERNAME} \
82-
--env=CYPRESS_KEYCLOAK_PASSWORD=${OIDC_PASSWORD} \
83-
--env=CYPRESS_KEYCLOAK_ROOT=${OIDC_ENDPOINT} \
84-
--env=CYPRESS_KEYCLOAK_CLIENT_ID=${OIDC_CLIENT_ID} \
85-
--env=CYPRESS_KEYCLOAK_REALM=${OIDC_REALM} \
8679
--env=AWS_BACKEND_SOURCE_LOCATION=${AWS_BACKEND_SOURCE_LOCATION} \
8780
--env=AWS_BACKEND_DESTINATION_LOCATION=${AWS_BACKEND_DESTINATION_LOCATION} \
8881
--env=AWS_S3_FAIL_BACKEND_DESTINATION_LOCATION=${AWS_BACKEND_DESTINATION_FAIL_LOCATION} \
@@ -196,19 +189,18 @@ run_e2e_test() {
196189

197190
## TODO use existing entrypoint
198191
if [ "$STAGE" = "end2end" ]; then
199-
## TODO: re-add npm run test_ui after ZENKO-4033
200-
run_e2e_test '' 'cd node_tests && npm run test_operator'
192+
run_e2e_test '' 'cd node_tests && yarn run test_operator'
201193
elif [ "$STAGE" = "debug" ]; then
202194
run_e2e_test '-ti' 'bash'
203195
elif [ "$STAGE" = "smoke" ]; then
204-
run_e2e_test '' 'cd node_tests && npm run test_smoke'
196+
run_e2e_test '' 'cd node_tests && yarn run test_smoke'
205197
elif [ "$STAGE" = "backbeat" ]; then
206198
## TODO: use node js to create and remove buckets
207-
run_e2e_test '' 'cd node_tests && ./gcp_shim.sh && npm run test_all_extensions && cd .. && python3 cleans3c.py'
199+
run_e2e_test '' 'cd node_tests && ./gcp_shim.sh && yarn run test_all_extensions && cd .. && python3 cleans3c.py'
208200
elif [ "$STAGE" = "iam-policies" ]; then
209-
run_e2e_test '' 'cd node_tests && npm run test_iam_policies'
201+
run_e2e_test '' 'cd node_tests && yarn run test_iam_policies'
210202
elif [ "$STAGE" = "object-api" ]; then
211-
run_e2e_test '' 'cd node_tests && npm run test_object_api'
203+
run_e2e_test '' 'cd node_tests && yarn run test_object_api'
212204
elif [ "$STAGE" = "lint" ]; then
213-
run_e2e_test '' 'cd node_tests && npm run lint'
205+
run_e2e_test '' 'cd node_tests && yarn run lint'
214206
fi

tests/zenko_tests/Dockerfile

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,35 @@
1-
FROM ubuntu:22.04
1+
FROM node:22.19.0-bookworm-slim
22

3-
ENV MOCHA_TAGS not:flaky
4-
ENV LANG C.UTF-8
5-
6-
# Add Node.js PPA
7-
RUN apt-get update && apt install -y curl
8-
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
3+
ENV MOCHA_TAGS=not:flaky
4+
ENV LANG=C.UTF-8
95

106
# Install dependencies
11-
RUN apt-get update && apt-get install -y \
12-
libgtk2.0-0 \
13-
libgtk-3-0 \
14-
libgbm-dev \
15-
libnotify-dev \
16-
libgconf-2-4 \
17-
libnss3 \
18-
libxss1 \
19-
libasound2 \
20-
libxtst6 \
21-
xauth \
22-
xvfb \
23-
nodejs \
7+
RUN apt-get update && apt-get install -y --no-install-recommends \
8+
ca-certificates \
9+
curl \
2410
git \
25-
python3.11 \
11+
python3 \
2612
python3-pip \
27-
gcc \
13+
python3-venv \
14+
build-essential \
2815
libffi-dev \
2916
musl-dev \
30-
libssl-dev && \
31-
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 0 && \
32-
mkdir -p /usr/local/bin/tests/node_tests
17+
libssl-dev \
18+
&& rm -rf /var/lib/apt/lists/* \
19+
&& apt-get clean \
20+
&& mkdir -p /usr/local/bin/tests/node_tests
21+
22+
ENV PATH=/opt/venv/bin:$PATH
3323

34-
COPY ./node_tests/package.json ./node_tests/package-lock.json /usr/local/bin/tests/node_tests/
24+
COPY ./node_tests/package.json ./node_tests/yarn.lock /usr/local/bin/tests/node_tests/
3525
COPY ./requirements.txt /tmp
3626

37-
RUN python3 -m pip install -r /tmp/requirements.txt tox && \
27+
RUN python3 -m venv /opt/venv && \
28+
pip install --no-cache-dir -U pip setuptools wheel && \
29+
pip install --no-cache-dir -r /tmp/requirements.txt tox && \
3830
cd /usr/local/bin/tests/node_tests && \
39-
npm install && \
40-
rm -rf /var/cache/apk/* && \
41-
npm cache clear --force && \
42-
rm -rf ~/.node-gyp && \
43-
rm -rf /tmp/npm-* && \
44-
rm -rf /var/cache/apk/*
31+
yarn cache clean && \
32+
yarn install --frozen-lockfile
4533

4634
# Copy Tests
4735
COPY . /usr/local/bin/tests/

tests/zenko_tests/node_tests/.eslintrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
}
2222
},
2323
"globals": {
24-
"cy": true,
25-
"Cypress": true,
2624
"document": true
2725
}
2826
}

0 commit comments

Comments
 (0)