a5398e8409
* ci: rework E2E infrastructure to use default namespace Board directive: E2E tests must run in the `default` namespace. Nothing should persist beyond a test run; no dedicated namespace needed. Changes: - e2e-ci-runner-rbac.yaml: retarget Role/RoleBinding to `default`, remove ClusterRole/ClusterRoleBinding (no longer needed since we don't need cluster-scoped namespace read permission) - e2e.yaml: set E2E_NAMESPACE=default - deploy-e2e-headlamp.sh: default namespace to `default`, remove namespace existence check (default always exists) - teardown-e2e-headlamp.sh: default namespace to `default`, remove namespace existence check guard - headlamp-e2e-values.yaml: update usage comment - e2e/README.md: remove namespace creation prerequisite Closes #78 #79 Co-Authored-By: Paperclip <noreply@paperclip.ing> * ci: add RBAC preflight check to deploy-e2e-headlamp.sh Fails fast with a clear error and remediation hint if the runner SA lacks configmap delete permission, instead of dying mid-deploy. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add ExemptionManager tests, coverage threshold, and ArtifactHub metadata - Add 22 unit tests for ExemptionManager.tsx covering: - Failing checks extraction (pod-level, container-level, ignore-severity, dedup) - Dialog open/close, check toggle, exempt-all toggle - Apply button enabled/disabled state - ApiProxy.request called with correct path (apps/batch/core) and annotation structure - Success and error feedback states, in-flight "Applying..." label - Add vitest coverage config with >=80% threshold (lines/functions/branches/statements) - Update artifacthub-pkg.yml: - Add install section (Headlamp-native plugin installer only) - Add appVersion: "5.0" (compatible Polaris dashboard version) - Expand distro-compat from "in-cluster" to "in-cluster,web,desktop" - Add changes block documenting v1.0 features Closes privilegedescalation/headlamp-polaris-plugin#81 (partial — test and metadata tasks) Co-Authored-By: Paperclip <noreply@paperclip.ing> * style: fix Prettier formatting in ExemptionManager.test.tsx Co-Authored-By: Paperclip <noreply@paperclip.ing> * fix: add @vitest/coverage-v8 devDependency for coverage provider vitest.config.mts specifies coverage.provider: 'v8' but the @vitest/coverage-v8 package was missing from devDependencies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Hugh Hackman <hugh@privilegedescalation.com> Co-authored-by: Paperclip <noreply@paperclip.ing> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Gandalf the Greybeard <gandalf@privilegedescalation.com> Co-authored-by: Samuel Stinkpost <samuel@privilegedescalation.dev> Co-authored-by: Gandalf the Greybeard <gandalf@privilegedescalation.dev>
25 lines
561 B
TypeScript
25 lines
561 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
'process.env.NODE_ENV': '"test"',
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
exclude: ['e2e/**', 'node_modules/**'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
include: ['src/**/*.{ts,tsx}'],
|
|
exclude: ['src/**/*.test.{ts,tsx}', 'src/test-utils.tsx', 'src/index.tsx'],
|
|
thresholds: {
|
|
lines: 80,
|
|
functions: 80,
|
|
branches: 80,
|
|
statements: 80,
|
|
},
|
|
},
|
|
},
|
|
});
|