Skip to content

Commit

Permalink
feat: update adminconsole version (#1431)
Browse files Browse the repository at this point in the history
* updated adminconsole version

* fix playwright tests

* fix playwright tests

* fix playwright tests

* fix playwright tests

---------

Co-authored-by: emosbaugh <[email protected]>
Co-authored-by: Ethan Mosbaugh <[email protected]>
  • Loading branch information
3 people authored Oct 31, 2024
1 parent b963225 commit bff8d72
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 14 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ create-node%:
-v $(shell pwd):/replicatedhq/embedded-cluster \
-v $(shell dirname $(shell pwd))/kots:/replicatedhq/kots \
$(if $(filter node0,node$*),-p $(NODE_PORT):$(NODE_PORT)) \
$(if $(filter node0,node$*),-p 30003:30003) \
replicated/ec-distro:$(DISTRO)

@$(MAKE) ssh-node$*
Expand Down
54 changes: 54 additions & 0 deletions e2e/playwright/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## Running Tests Against the Development Environment

1. Install deps on your Mac

```bash
npm ci
npx playwright install --with-deps
code --install-extension ms-playwright.playwright
```

1. Build the release and run the development environment

```bash
make initial-release
make create-node0
output/bin/embedded-cluster install --license local-dev/license.yaml
```

1. Create a nodeport service directly to kotsadm

```bash
cat <<EOF | k0s kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: kotsadm-nodeport
namespace: kotsadm
labels:
replicated.com/disaster-recovery: infra
replicated.com/disaster-recovery-chart: admin-console
spec:
type: NodePort
ports:
- port: 30003
targetPort: 3000
nodePort: 30003
selector:
app: kotsadm
EOF
```
1. Configure the base URL (default is `http://localhost:30000`) on your Mac
```bash
export BASE_URL=http://localhost:30003
```
1. Run the test on your Mac
```bash
npx playwright test --ui deploy-app
```
Don't forget to press the play button in the browser to run the test.
2 changes: 1 addition & 1 deletion e2e/playwright/tests/deploy-upgrade/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test('deploy upgrade', async ({ page }) => {
await iframe.locator('input[type="password"]').fill('updated password');
await iframe.getByRole('button', { name: 'Next', exact: true }).click();
await expect(iframe.getByText('Preflight checks', { exact: true })).toBeVisible({ timeout: 10 * 1000 });
await expect(iframe.getByRole('button', { name: 'Re-run' })).toBeVisible({ timeout: 10 * 1000 });
await expect(iframe.getByRole('button', { name: 'Rerun' })).toBeVisible({ timeout: 10 * 1000 });
await expect(iframe.locator('#app')).toContainText('Embedded Cluster Installation CRD exists');
await expect(iframe.locator('#app')).toContainText('Embedded Cluster Config CRD exists');
await expect(iframe.getByRole('button', { name: 'Back: Config' })).toBeVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { login } from '../shared';

test('get restore join controller command', async ({ page }) => {
await login(page);
await page.getByRole('button', { name: 'Add node', exact: true }).click();
await expect(page.locator('#controller-testNodeType')).toBeChecked();
await expect(page.locator('.CodeSnippet-copy')).toBeVisible();
const joinCommand = await page.locator('.react-prism.language-bash').first().textContent();
Expand Down
4 changes: 2 additions & 2 deletions e2e/playwright/tests/shared/deploy-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export const deployApp = async (page, expect) => {
await page.locator('input[type="password"]').click();
await page.locator('input[type="password"]').fill('password');
await page.getByRole('button', { name: 'Continue' }).click();
await expect(page.getByText('Preflight checks', { exact: true })).toBeVisible({ timeout: 10 * 1000 });
await expect(page.getByRole('button', { name: 'Re-run' })).toBeVisible({ timeout: 10 * 1000 });
await expect(page.getByText('Validate the environment')).toBeVisible({ timeout: 10 * 1000 });
await expect(page.getByRole('button', { name: 'Rerun' })).toBeVisible({ timeout: 10 * 1000 });
await expect(page.locator('#app')).toContainText('Embedded Cluster Installation CRD exists');
await expect(page.locator('#app')).toContainText('Embedded Cluster Config CRD exists');
await page.getByRole('button', { name: 'Deploy' }).click();
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ require (
github.com/prometheus/common v0.60.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/redis/go-redis/v9 v9.5.2 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/rubenv/sql-migrate v1.7.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=
github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/rubenv/sql-migrate v1.7.0 h1:HtQq1xyTN2ISmQDggnh0c9U3JlP8apWh8YO2jzlXpTI=
Expand Down
18 changes: 9 additions & 9 deletions pkg/addons/adminconsole/static/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
# $ make buildtools
# $ output/bin/buildtools update addon <addon name>
#
version: 1.119.1
version: 1.120.0
location: oci://proxy.replicated.com/anonymous/registry.replicated.com/library/admin-console
images:
kotsadm:
repo: proxy.replicated.com/anonymous/kotsadm/kotsadm
tag:
amd64: v1.119.1-amd64@sha256:b8411f22fa77554474703af55fbbe2baff7da6ee3c01423fc285b2f675391abe
arm64: v1.119.1-arm64@sha256:e5aa6b35649af9d6160055873a27bb76a4ae551e69685968a6cb73c9dc57e74f
amd64: v1.120.0-amd64@sha256:4538a281a43f95f2b2dad534cfbf0b8493faa29c2959684ee7429eb04c7e79bb
arm64: v1.120.0-arm64@sha256:150ce42b94ad2720aecb07b2c890962ffe5875531111b8f18d083a280369f6ce
kotsadm-migrations:
repo: proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations
tag:
amd64: v1.119.1-amd64@sha256:30a001ae10048b1e07d73dcdd6c575603826c6363f8d3992c3bccfd68ead5df3
arm64: v1.119.1-arm64@sha256:000ec5f6e479f7c87f6c07ed6a6def6f1be79b370950df2ba01cd7965ca4496b
amd64: v1.120.0-amd64@sha256:43abd09a1d5157c53352ea29d94d10dcae5c340923afa5d1bf8765becab347ce
arm64: v1.120.0-arm64@sha256:2e5cb8e30b383c62ea910f89294220a571dd6956d03507f04278cc2f3e5f79ec
kurl-proxy:
repo: proxy.replicated.com/anonymous/kotsadm/kurl-proxy
tag:
amd64: v1.119.1-amd64@sha256:44e8939d8101b5aeeb44087d7e8cbb23054e2004c86525342f32aa4d9e86371f
arm64: v1.119.1-arm64@sha256:53f0dd72f2ed4d95445d91af435f89a957b9abeacd30fe951069bce35b11934c
amd64: v1.120.0-amd64@sha256:e519cc3ccc7a392a762999c0839f031f1444ff9c9bef4908af742399852d98f5
arm64: v1.120.0-arm64@sha256:d22c10e07f7cb16c7e535bf0c69e196b92fe2be63befe3ba0d48993a4a5ef0e4
rqlite:
repo: proxy.replicated.com/anonymous/kotsadm/rqlite
tag:
amd64: 8.31.3-r0-amd64@sha256:575844e0b531567660ea9782c6aaab827af2d8bcff4ca5769c4ea5c6df3e5f8a
arm64: 8.31.3-r0-arm64@sha256:84bcef9357d1f83df2a742e14a5b6be12d4adbf7522682f565ed024374bda17f
amd64: 8.32.4-r0-amd64@sha256:5756786db1e4ae8490b8f37d9fb52c102c962896f8d3276d3e8e3420aff7a2eb
arm64: 8.32.4-r0-arm64@sha256:5b63a08af531e328439fc79ddb4f0b83cddabdf84dfa2ab683fbf7381fd9a127

0 comments on commit bff8d72

Please sign in to comment.