test(auth): move jobs-auth tests to integration suite and extract shared fixtures#861
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (12)
🚧 Files skipped from review as they are similar to previous changes (11)
📝 WalkthroughWalkthroughThe PR extracts Kind E2E cleanup into a reusable composite action and centralizes pytest services-pool fixtures and reporting. Authentication integration tests are added to discovery, migrated to shared helpers and SDK fixtures, and the Kubernetes auth runner is updated. ChangesKind E2E cleanup
Authentication integration services pool
Sequence Diagram(s)sequenceDiagram
participant Pytest
participant ServicesPoolFixtures
participant E2EServicesPool
participant ServicesPoolSDK
participant TestReport
Pytest->>ServicesPoolFixtures: configure_services_pool(config)
Pytest->>ServicesPoolFixtures: register_services_pool_items(config, items)
ServicesPoolFixtures->>E2EServicesPool: acquire module services
ServicesPoolFixtures->>ServicesPoolSDK: construct NeMoPlatform client
ServicesPoolFixtures->>TestReport: append services log and binding sections
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@e2e/services_pool_fixtures.py`:
- Around line 96-101: Update the fixture’s fallback log storage around
_services_log_key to key service log paths by module.nodeid rather than
retaining a single last path. When active binding metadata is unavailable, look
up the path for the current module so failures cannot reuse another module’s
log.
- Around line 61-63: Update the log-tail handling around log_path.read_text so
it streams the file and retains only the last _TAIL_LINES_ON_FAILURE lines,
avoiding materialization of the complete services log while preserving the
existing tail output behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2560b490-ae73-4cb0-add4-bcdb3b71bc92
📒 Files selected for processing (11)
.github/actions/finalize-kind-e2e/action.yaml.github/workflows/ci.yamle2e/conftest.pye2e/k8s/scripts/run_auth_e2e.she2e/services_pool.pye2e/services_pool_fixtures.pypytest.initests/auth/integration/conftest.pytests/auth/integration/jobs_auth_helpers.pytests/auth/integration/test_jobs_auth.pytests/auth/test_jobs_auth_helpers.py
|
9773f57 to
1ad244d
Compare
crookedstorm
left a comment
There was a problem hiding this comment.
This should tidy up a bit. It feels like this probably should become a javascript action so it has a nice teardown hook, but honestly, it's not necessary right now.
anastasia-nesterenko
left a comment
There was a problem hiding this comment.
nit question
Signed-off-by: Ryan S <[email protected]>
1ad244d to
4cfa443
Compare
Signed-off-by: Ryan S <[email protected]>
Summary
Relocates the jobs-auth e2e tests (
test_jobs_auth.py) frome2e/into a newtests/auth/integration/directory so they run as integration tests backed by the services pool rather than requiring a full Kubernetes cluster. This enables the tests to run in CI without the--kubernetesflag.Changes
Test relocation and refactoring
e2e/test_jobs_auth.py→tests/auth/integration/test_jobs_auth.pywith updated imports and fixture usagemanaged_admin_workspace,job_exists_in_pages) intotests/auth/integration/jobs_auth_helpers.pytests/test_e2e_jobs_auth.py→tests/auth/test_jobs_auth_helpers.pytests/authtopytest.initestpathsShared fixtures extraction
e2e/conftest.pyintoe2e/services_pool_fixtures.pyso both the e2e and auth integration suites can reuse themservices_pool_sdkfixture with explicitDefaultHttpxClientfor local pool processestests/auth/integration/conftest.pywith the shared fixtures and report hooksCI improvements
.github/actions/finalize-kind-e2e/composite action consolidating the repeated Kind cleanup steps (log collection, disk summary, artifact upload, cluster deletion)kind-smokeandkind-cpu-e2ejobs with the new composite actione2e/k8s/scripts/run_auth_e2e.sh: removetest_jobs_auth.pyfrom default targets, exportNMP_BASE_URL, switch to--run-e2eflagTest correctness
principal_id(UUID) per test user instead of reusing the email as subject, matching real IdP behaviorSummary by CodeRabbit