Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c6cfc88f4 | |||
| 540f0a7890 | |||
| 3f93e71f28 | |||
| 0d9f9d859a | |||
| 61df61c691 | |||
| 15d161c312 |
@@ -16,8 +16,9 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e:
|
e2e:
|
||||||
uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@hugh/add-pnpm-support-plugin-e2e
|
uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@main
|
||||||
with:
|
with:
|
||||||
node-version: '22'
|
node-version: "22"
|
||||||
headlamp-version: v0.40.1
|
headlamp-version: v0.40.1
|
||||||
e2e-namespace: headlamp-dev
|
e2e-namespace: headlamp-dev
|
||||||
|
plugin-name: rook
|
||||||
|
|||||||
+10
-5
@@ -24,14 +24,14 @@ test.describe('Rook plugin smoke tests', () => {
|
|||||||
|
|
||||||
await page.waitForLoadState('networkidle');
|
await page.waitForLoadState('networkidle');
|
||||||
await expect(page).toHaveURL(/rook-ceph/);
|
await expect(page).toHaveURL(/rook-ceph/);
|
||||||
await expect(page.getByRole('heading', { name: /overview/i })).toBeVisible();
|
await expect(page.getByRole('heading', { name: /overview/i }).first()).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('overview page renders content', async ({ page }) => {
|
test('overview page renders content', async ({ page }) => {
|
||||||
await page.goto('/c/main/rook-ceph');
|
await page.goto('/c/main/rook-ceph');
|
||||||
await waitForSidebar(page);
|
await waitForSidebar(page);
|
||||||
|
|
||||||
await expect(page.getByRole('heading', { name: /overview/i })).toBeVisible({
|
await expect(page.getByRole('heading', { name: /overview/i }).first()).toBeVisible({
|
||||||
timeout: 15_000,
|
timeout: 15_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -42,22 +42,27 @@ test.describe('Rook plugin smoke tests', () => {
|
|||||||
|
|
||||||
test('navigation to storage classes view works', async ({ page }) => {
|
test('navigation to storage classes view works', async ({ page }) => {
|
||||||
await page.goto('/c/main/rook-ceph');
|
await page.goto('/c/main/rook-ceph');
|
||||||
|
|
||||||
const sidebar = page.getByRole('navigation', { name: 'Navigation' });
|
const sidebar = page.getByRole('navigation', { name: 'Navigation' });
|
||||||
|
|
||||||
|
const rookBtn = sidebar.getByRole('button', { name: /rook/i });
|
||||||
|
await rookBtn.click();
|
||||||
|
await page.waitForLoadState('networkidle');
|
||||||
|
|
||||||
const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i });
|
const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i });
|
||||||
await expect(storageClassesLink).toBeVisible({ timeout: 10_000 });
|
await expect(storageClassesLink).toBeVisible({ timeout: 10_000 });
|
||||||
await storageClassesLink.click();
|
await storageClassesLink.click();
|
||||||
|
|
||||||
await page.waitForLoadState('networkidle');
|
await page.waitForLoadState('networkidle');
|
||||||
await expect(page).toHaveURL(/rook-ceph\/storage-classes/);
|
await expect(page).toHaveURL(/rook-ceph\/storage-classes/);
|
||||||
await expect(page.getByRole('heading', { name: /storage class/i })).toBeVisible({ timeout: 15_000 });
|
await expect(page.getByRole('heading', { name: /storage class/i }).first()).toBeVisible({ timeout: 15_000 });
|
||||||
});
|
});
|
||||||
|
|
||||||
test('plugin settings page shows rook plugin entry', async ({ page }) => {
|
test('plugin settings page shows rook plugin entry', async ({ page }) => {
|
||||||
await page.goto('/settings/plugins');
|
await page.goto('/settings/plugins');
|
||||||
await page.waitForLoadState('networkidle');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await page.waitForSelector('table, [class*="PluginList"], [class*="plugin"]', { timeout: 10_000 }).catch(() => {});
|
||||||
|
|
||||||
const pluginEntry = page.locator('text=rook').first();
|
const pluginEntry = page.locator('text=/rook/i').first();
|
||||||
await expect(pluginEntry).toBeVisible({ timeout: 30_000 });
|
await expect(pluginEntry).toBeVisible({ timeout: 30_000 });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,6 +35,17 @@ if ! kubectl auth can-i delete configmaps -n "$E2E_NAMESPACE" --quiet 2>/dev/nul
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== Pre-deployment cluster diagnostics ==="
|
||||||
|
echo "Nodes:"
|
||||||
|
kubectl get nodes -o wide 2>&1 || true
|
||||||
|
echo ""
|
||||||
|
echo "headlamp-dev namespace state:"
|
||||||
|
kubectl get ns headlamp-dev -o yaml 2>&1 || true
|
||||||
|
echo ""
|
||||||
|
echo "Existing E2E resources in namespace:"
|
||||||
|
kubectl get all -n "$E2E_NAMESPACE" -l "app.kubernetes.io/instance=$E2E_RELEASE" 2>&1 || true
|
||||||
|
|
||||||
echo "=== E2E Headlamp Deployment ==="
|
echo "=== E2E Headlamp Deployment ==="
|
||||||
echo " Image: ghcr.io/headlamp-k8s/headlamp:${HEADLAMP_VERSION}"
|
echo " Image: ghcr.io/headlamp-k8s/headlamp:${HEADLAMP_VERSION}"
|
||||||
echo " Namespace: $E2E_NAMESPACE"
|
echo " Namespace: $E2E_NAMESPACE"
|
||||||
@@ -60,7 +71,7 @@ kubectl delete serviceaccount "${E2E_RELEASE}" -n "$E2E_NAMESPACE" --ignore-not-
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Deploying Headlamp E2E instance..."
|
echo "Deploying Headlamp E2E instance..."
|
||||||
|
|
||||||
kubectl apply -f - <<EOF
|
if ! kubectl apply -f - <<EOF
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
@@ -113,7 +124,7 @@ spec:
|
|||||||
port: http
|
port: http
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
failureThreshold: 6
|
failureThreshold: 6
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
@@ -148,6 +159,12 @@ spec:
|
|||||||
targetPort: http
|
targetPort: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
EOF
|
EOF
|
||||||
|
then
|
||||||
|
echo "ERROR: kubectl apply failed. Dumping cluster state..." >&2
|
||||||
|
kubectl get all -n "$E2E_NAMESPACE" 2>&1 || true
|
||||||
|
kubectl get events -n "$E2E_NAMESPACE" --sort-by='.lastTimestamp' 2>&1 | tail -30 || true
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Waiting for rollout..."
|
echo "Waiting for rollout..."
|
||||||
kubectl rollout status "deployment/${E2E_RELEASE}" \
|
kubectl rollout status "deployment/${E2E_RELEASE}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user