Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock E2E tests for AWS #3708

Merged
merged 27 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0d5e957
Update Cypress
maciaszczykm Sep 21, 2021
28bac7c
Regenrate package lock
maciaszczykm Sep 21, 2021
c794340
Revert version bump
maciaszczykm Sep 21, 2021
c805560
Reset package lock
maciaszczykm Sep 21, 2021
1e510b3
Add more mocks
maciaszczykm Sep 22, 2021
3e11fdc
Save changes
maciaszczykm Sep 22, 2021
2d643e7
Uncomment code
maciaszczykm Sep 22, 2021
4411c7c
Merge remote-tracking branch 'upstream/master' into mock-e2e-tests
maciaszczykm Sep 28, 2021
f877055
Format files
maciaszczykm Sep 28, 2021
6f0038c
Merge remote-tracking branch 'upstream/master' into mock-e2e-tests
maciaszczykm Sep 29, 2021
cc13a15
Add more mocks
maciaszczykm Sep 29, 2021
c626755
Add more mocks
maciaszczykm Sep 29, 2021
c649cc5
Add new test job
maciaszczykm Sep 29, 2021
f30185c
Format file
maciaszczykm Sep 29, 2021
2a3a22a
Change env value type
maciaszczykm Sep 29, 2021
c579338
Source lib.sh only when it's required
maciaszczykm Sep 30, 2021
b50cef7
Use env variable
maciaszczykm Sep 30, 2021
e62aeff
Organize mocks
maciaszczykm Sep 30, 2021
b4f73ec
Fix issue with project deletion
maciaszczykm Oct 1, 2021
9335dc3
Clean up
maciaszczykm Oct 1, 2021
b57dfa9
Fix interceptor paths
maciaszczykm Oct 1, 2021
eee92cc
Configure jobs
maciaszczykm Oct 4, 2021
9d8634d
Clean up
maciaszczykm Oct 4, 2021
32b5bfa
Merge remote-tracking branch 'upstream/master' into mock-e2e-tests
maciaszczykm Oct 4, 2021
addd0e9
Use headless mode
maciaszczykm Oct 4, 2021
44ac6b7
Fix env var handling
maciaszczykm Oct 4, 2021
cf03953
Use image with preinstalled mc
maciaszczykm Oct 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ presubmits:

- name: pre-dashboard-test-e2e
always_run: true
optional: false
decorate: true
clone_uri: "ssh://[email protected]/kubermatic/dashboard.git"
extra_refs:
Expand Down Expand Up @@ -112,6 +113,7 @@ presubmits:

- name: pre-dashboard-test-e2e-ce
always_run: true
optional: false
decorate: true
clone_uri: "ssh://[email protected]/kubermatic/dashboard.git"
extra_refs:
Expand Down Expand Up @@ -165,6 +167,62 @@ presubmits:
name: e2e-ci
key: serviceAccountSigningKey

- name: pre-dashboard-test-e2e-mock-ee
always_run: true
optional: false
decorate: true
clone_uri: "ssh://[email protected]/kubermatic/dashboard.git"
labels:
preset-minio: "true"
spec:
containers:
- image: quay.io/kubermatic/e2e-cypress:v1.0.0
imagePullPolicy: Always
command:
- make
- run-e2e-ci
resources:
requests:
memory: 3Gi
cpu: 2
limits:
memory: 6Gi
cpu: 4
env:
- name: NO_COLOR
value: "1"
- name: USE_MOCKS
value: "true"

- name: pre-dashboard-test-e2e-mock-ce
always_run: true
optional: false
decorate: true
clone_uri: "ssh://[email protected]/kubermatic/dashboard.git"
labels:
preset-minio: "true"
spec:
containers:
- image: quay.io/kubermatic/e2e-cypress:v1.0.0
imagePullPolicy: Always
command:
- make
- run-e2e-ci
resources:
requests:
memory: 3Gi
cpu: 2
limits:
memory: 6Gi
cpu: 4
env:
- name: KUBERMATIC_EDITION
value: ce
- name: NO_COLOR
value: "1"
- name: USE_MOCKS
value: "true"

- name: pre-dashboard-build-image
always_run: true
decorate: true
Expand Down
31 changes: 31 additions & 0 deletions containers/e2e-cypress/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2020 The Kubermatic Kubernetes Platform contributors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM quay.io/kubermatic/build:go-1.17-node-14-kind-0.11-1 AS kkpbuild

FROM cypress/browsers:node14.17.0-chrome88-ff89
LABEL maintainer="[email protected]"

ENV GO_VERSION="1.17.1"

COPY --from=kkpbuild /usr/local/bin/mc /usr/local/bin/mc
COPY --from=kkpbuild /root/.bashrc /root/.bashrc

RUN apt-get update -qq && \
apt-get install -y \
curl \
bash \
bash-completion \
gettext \
git && \
rm -rf /var/lib/apt/lists/*

ENV PATH /usr/local/go/bin:$PATH
20 changes: 20 additions & 0 deletions containers/e2e-cypress/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Copyright 2020 The Kubermatic Kubernetes Platform contributors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

cd $(dirname $0)

image="quay.io/kubermatic/e2e-cypress:v1.0.0"

docker build --no-cache --pull -t "$image" .
docker push "$image"
45 changes: 45 additions & 0 deletions cypress/fixtures/clusters/aws/list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[
{
"id": "zs6qc9b9wh",
"name": "test-cluster",
"creationTimestamp": "2021-09-22T11:43:45Z",
"labels": {},
"type": "kubernetes",
"spec": {
"cloud": {
"dc": "aws-eu-central-1a",
"aws": {}
},
"version": "1.21.3",
"oidc": {},
"enableUserSSHKeyAgent": true,
"auditLogging": {},
"opaIntegration": {},
"mla": {
"monitoringEnabled": true,
"loggingEnabled": true
},
"containerRuntime": "containerd",
"clusterNetwork": {
"services": {
"cidrBlocks": [
"10.240.16.0/20"
]
},
"pods": {
"cidrBlocks": [
"172.25.0.0/16"
]
},
"dnsDomain": "cluster.local",
"proxyMode": "ipvs",
"nodeLocalDNSCacheEnabled": true
}
},
"status": {
"version": "1.21.3",
"url": "https://test-cluster.com:6443",
"externalCCMMigration": "Unsupported"
}
}
]
43 changes: 43 additions & 0 deletions cypress/fixtures/clusters/aws/single.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "zs6qc9b9wh",
"name": "test-cluster",
"creationTimestamp": "2021-09-22T11:43:45Z",
"labels": {},
"type": "kubernetes",
"spec": {
"cloud": {
"dc": "aws-eu-central-1a",
"aws": {}
},
"version": "1.21.3",
"oidc": {},
"enableUserSSHKeyAgent": true,
"auditLogging": {},
"opaIntegration": {},
"mla": {
"monitoringEnabled": true,
"loggingEnabled": true
},
"containerRuntime": "containerd",
"clusterNetwork": {
"services": {
"cidrBlocks": [
"10.240.16.0/20"
]
},
"pods": {
"cidrBlocks": [
"172.25.0.0/16"
]
},
"dnsDomain": "cluster.local",
"proxyMode": "ipvs",
"nodeLocalDNSCacheEnabled": true
}
},
"status": {
"version": "1.21.3",
"url": "https://test-cluster.com:6443",
"externalCCMMigration": "Unsupported"
}
}
Loading