Skip to content

OSAC-3593: Migrate bmaas e2e test suite & core test infra from osac-test-infra (1/5) - #488

Merged
omer-vishlitzky merged 140 commits into
osac-project:mainfrom
redhat-chai-bot:osac-3593/migrate-bmaas
Aug 25, 2026
Merged

OSAC-3593: Migrate bmaas e2e test suite & core test infra from osac-test-infra (1/5)#488
omer-vishlitzky merged 140 commits into
osac-project:mainfrom
redhat-chai-bot:osac-3593/migrate-bmaas

Conversation

@amej

@amej amej commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

History-preserving migration of the bmaas e2e test suite from osac-test-infra into this mono-repo. This is PR 1 of 5 in a stacked series — one per test suite (bmaas → vmaas → caas → catalog → storage).

Commit history from osac-test-infra is preserved via git filter-repo, so git log tests/bmaas/ shows the original authors and messages.

What this PR adds

  • tests/bmaas/ — BMaaS lifecycle, inventory-exhaustion, and networking e2e tests with suite-level conftest.py
  • tests/core/ — shared test utilities used by all suites (grpc_client, k8s_client, keycloak, helpers, runner, etc.)
  • tests/conftest.py — session-scoped fixtures (gRPC client, Keycloak setup, tenant provisioning) inherited by every suite
  • pyproject.toml — pytest configuration (testpaths, pythonpath, pytest-xdist parallelism, markers, logging) migrated from osac-test-infra

Placement decision

Tests live at repo-root tests/ (not nested under components). This preserves the existing import chain (from tests.core.*) and pytest conftest hierarchy with zero refactoring.

Stack overview

PR Suite Base
1/5 (this PR) bmaas + shared infra ([main](https://github.com/osac-project/osac/tree/main))
2/5 vmaas this branch
3/5 caas vmaas branch
4/5 catalog caas branch
5/5 storage catalog branch

Merge order matters — this PR must land first since it contains pyproject.toml, tests/core/, and the shared conftest.py that all subsequent suites depend on.

Context

Test plan

  • Verify git log tests/bmaas/ shows original commit history from osac-test-infra
  • Verify git log tests/core/ shows original commit history
  • Confirm pytest discovers all bmaas tests: python -m pytest tests/bmaas/ --collect-only
  • Full e2e validation after all 5 PRs are merged (per OSAC-3593 acceptance criteria)

Summary by CodeRabbit

  • New Features
    • Added a comprehensive end-to-end testing foundation for compute, networking, bare-metal, authentication, metering, and lifecycle workflows.
    • Added coverage for networking connectivity, tenant isolation, external IP behavior, NAT, and resource cleanup.
    • Added bare-metal lifecycle, restart, inventory exhaustion, provisioning, and recovery scenarios.
    • Added reusable command-line, API, Kubernetes, authentication, polling, and metering test utilities.
  • Chores
    • Added project configuration for testing, formatting, linting, and type checking.

omer-vishlitzky and others added 30 commits March 23, 2026 16:50
Port all ansible e2e tests to pytest with 1:1 parity. The hub
creation test was removed — hub creation is implicitly verified by
every compute instance test since they all go through the fulfillment
api on the hub.

Tests support a two-cluster topology where the hub cluster runs the
osac operator and the remote cluster runs the kubevirt VMs. The k8s
client takes a kubeconfig parameter, and tests that need to inspect
VMs on the remote cluster use a separate OSAC_VM_KUBECONFIG env var.
See MGMT-23623 for the remote cluster setup script.

Tests:
- compute instance lifecycle (create, wait for running, delete)
- delete during provision
- restart (trigger via grpc, verify new vmi creation timestamp)
- restart negative (past timestamp ignored)
- api fields (explicit cpu/memory/disk via grpc)
- cli fields (explicit cpu/memory/disk via fulfillment-cli)

Infrastructure:
- k8s client with two-kubeconfig support (hub + remote)
- grpc client wrapping grpcurl
- fulfillment-cli wrapper with typed methods
- poll_until helper matching ansible retry semantics
- Makefile with MAKEFILE_TARGET dispatch for ci
- pyproject.toml with ruff and basedpyright config
…-networking

MGMT-22635: add VMaaS networking tests and test infrastructure improvements
- Change default CLI binary from fulfillment-cli to osac
- Fix OSAC_NETWORK_CLASS default from osac.templates.cudn_net
  to cudn_net to match actual NetworkClass implementation_strategy
…x-test-defaults

MGMT-22635: fix test defaults for CI environment
Generated-By: Claude Code (Anthropic)
Signed-off-by: Will Gordon <wgordon@redhat.com>
…ter control on run_if_changed tests triggers on release
NO_ISSUE: remove unused code and refactor tests structure
- Add --pull-secret-file and --ssh-public-key-file params to OsacCLI.create_cluster
- Add get_cluster method to GRPCClient
- Add get_cluster_order_spec method to K8sClient
- Add test_cluster_explicit_fields: verifies explicit fields flow through
  CLI → API (with redaction) → ClusterOrder CR (with typed fields)

Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Elad Tabak <etabak@redhat.com>
…lds-e2e

OSAC-150: add E2E test for explicit cluster configuration fields
The feedback controller removes its finalizer before sending the
Signal RPC to fulfillment-service. This means the CR disappears
from kubectl before the fulfillment-service archives the DB record.
Tests that assert immediately after wait_for_deletion hit a race
where the UUID is still in the gRPC list.

Replace bare assertions with poll_until via wait_for_grpc_removal
(up to 60s). In the normal case the UUID is gone on the first poll.
The E2E tests authenticate exclusively via Kubernetes service account
tokens, never via Keycloak JWT, and have no multi-tenant isolation or
SecurityGroup lifecycle coverage.

New test infrastructure:
- OsacCLI.get() and get_unchecked() for osac get <resource>
- Keycloak JWT token helper (tests/core/keycloak.py)
- JWT fixtures: jwt_cli_user, jwt_cli_admin, jwt_grpc_tenant1/2
- GRPCClient: SecurityGroup CRUD, Get for VNet/Subnet/ComputeInstance
- K8sClient: SecurityGroup CR queries
- Helpers: SecurityGroup wait functions

New tests:
- JWT List access for all 12 public API resource types x 2 users (24)
- Authorization boundary: regular user denied Users, admin allowed (2)
- Invalid token rejection (1)
- JWT VirtualNetwork lifecycle: create/get/list/delete via JWT (1)
- JWT SecurityGroup lifecycle: create/list/delete via JWT (1)
- Multi-tenant isolation: tenant1 resource invisible to tenant2 (1)

New test file: SecurityGroup lifecycle (SA token):
- Create VNet, create SecurityGroup, wait for CR and Ready
- Verify Get returns correct name
- Delete SecurityGroup and VNet, verify cleanup

Extended existing tests with Get assertions:
- test_virtual_network_lifecycle: Get after create
- test_subnet_lifecycle: Get after create
- test_compute_instance_creation: Get after create

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ke-tests

NO-ISSUE: bring VMaaS E2E test suite up to date
Add test-caas Makefile target, kubeconfig/password retrieval tests,
template immutability test, and fix cluster grpc removal to use
polling instead of one-shot assertion. Update default template to
ocp_ci_small for CI environments.
MGMT-22635: add CaaS test coverage and test-caas target
When an AAP deprovision job fails (intermittent receptor worker
stream drop, ~2-5% rate), the operator retries with exponential
backoff. The retry succeeds within ~7 minutes but the previous
300s (5 min) timeout on kubectl delete and deletion wait polls
expires before the retry completes, failing the test.

Bump all deletion waits to 120 retries x 5s = 600s (10 min) and
kubectl delete timeout to 600s to accommodate the operator retry.
…imeout

NO_ISSUE: bump deletion timeouts from 300s to 600s
wait_for_provision and wait_for_running poll until success but
do not check for terminal failure. When provisioning fails
immediately (e.g. DataVolumeError), each test wastes 10-15
minutes of the 60-minute CI timeout before raising TimeoutError.
Assert state/phase != Failed so the test fails immediately
with a clear error instead of burning the timeout budget.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-provision-wait

NO_ISSUE: helpers - fail fast when provision job or phase enters Failed
…sion

Previously wait_for_provision checked the latest AAP job state and
failed immediately if it saw "Failed". The operator retries failed
provision jobs with exponential backoff, so a transient AAP failure
followed by a successful retry is normal behavior. Asserting on
individual job state made the test fragile and caused false failures
in CI.

The fix polls the Provisioned status condition instead, which reflects
the end result (infrastructure provisioned) regardless of how many
AAP job attempts it took.

Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Assisted-by: Cursor/Claude
Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Add a phase check so wait_for_provision fails immediately if the
ComputeInstance reaches Failed phase, rather than waiting the full
timeout. Transient AAP job failures (which keep the phase at Starting)
are still tolerated until the Provisioned condition becomes True.

Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Assisted-by: Cursor/Claude
Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
…rovision-condition

fix: use Provisioned condition instead of job state in wait_for_provision
…tion bug

- test_cluster_explicit_fields: use template parameters (-p/-f) instead of
  deprecated --pull-secret-file/--ssh-public-key-file CLI flags, update
  assertions to check templateParameters instead of top-level spec fields
- test_cluster_order_delete_during_provision: check CR phase (Progressing)
  instead of internal job state which races with operator retries, replace
  bare grpc assert with retried wait_for_cluster_grpc_removal
- helpers: work around hypershift bug where capi-provider-agent controller
  is killed during HostedCluster teardown before it can remove the
  AgentCluster deprovision finalizer, causing infinite deletion deadlock.
  Force-remove orphaned finalizers during wait_for_cluster_deletion poll.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Fulfillment-service pull request osac-project#603 adds a foreign key constraint
requiring every resource's tenant to reference an existing organization.
Create the required organizations (shared, tenant1, tenant2) at session
start so that tests creating resources via the API continue to work.

Related: osac-project/fulfillment-service#603
Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
The 'shared' organization is built-in and doesn't need to be created.

Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Check for 'Code: AlreadyExists' instead of a bare 'AlreadyExists'
substring so that errors whose message happens to contain that
string are not silently swallowed.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
…rganizations

NO-ISSUE: Ensure tenant organizations exist before E2E tests
…nsure-tenant-organizations

Revert "NO-ISSUE: Ensure tenant organizations exist before E2E tests"
The HyperShift CAPI provider sometimes fails to clear the
clusterdeployment-namespace label from agents after HostedCluster
deletion. The delete playbook's detach_and_unlabel_all_removed_agents
skips agents with this label set, leaving the clusterorder label stuck
and blocking agent reuse for all subsequent tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci

openshift-ci Bot commented Aug 25, 2026

Copy link
Copy Markdown

@amej: No presubmit jobs available for osac-project/osac@main

Details

In response to this:

/test all

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions

Copy link
Copy Markdown

No PR workflow runs found matching /test all at commit e2e6d8a. Use /test ? to see available commands.

@amej
amej marked this pull request as ready for review August 25, 2026 09:00
@openshift-ci
openshift-ci Bot requested review from avishayt and rccrdpccl August 25, 2026 09:00
@omer-vishlitzky
omer-vishlitzky dismissed coderabbitai[bot]’s stale review August 25, 2026 09:00

Auto-dismissed: only Prow labels gate merging

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:02 AM UTC · Completed 9:20 AM UTC

Commit: e2e6d8a · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $8.77

@amej

amej commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@rccrdpccl :
OSAC-4434 — Core test review feedback (4 findings: grpc_client, keycloak, metering, k8s_client) | Components: Core, Infrastructure filed.
OSAC-4435 — BMaaS test review feedback (5 findings: SSH isolation, TimeoutExpired, xdist, cleanup leak, bare pass) | Components: BMaaS, Infrastructure filed.

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

@amej The Core and BMaaS findings have follow-up tracking in OSAC-4434 and OSAC-4435. Approving this migration PR.

✅ Action performed

Comments resolved and changes approved.

@carbonin

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Aug 25, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amej, carbonin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@omer-vishlitzky
omer-vishlitzky added this pull request to the merge queue Aug 25, 2026
Merged via the queue into osac-project:main with commit 373bcf5 Aug 25, 2026
181 of 190 checks passed
CrystalChun added a commit to CrystalChun/osac that referenced this pull request Aug 25, 2026
…est-infra (1/5) (osac-project#488)

## Summary

History-preserving migration of the **bmaas** e2e test suite from
[osac-test-infra](https://github.com/osac-project/osac-test-infra) into
this mono-repo. This is **PR 1 of 5** in a stacked series — one per test
suite (bmaas → vmaas → caas → catalog → storage).

Commit history from `osac-test-infra` is preserved via `git
filter-repo`, so `git log tests/bmaas/` shows the original authors and
messages.

### What this PR adds

- **`tests/bmaas/`** — BMaaS lifecycle, inventory-exhaustion, and
networking e2e tests with suite-level `conftest.py`
- **`tests/core/`** — shared test utilities used by all suites
(`grpc_client`, `k8s_client`, `keycloak`, `helpers`, `runner`, etc.)
- **`tests/conftest.py`** — session-scoped fixtures (gRPC client,
Keycloak setup, tenant provisioning) inherited by every suite
- **`pyproject.toml`** — pytest configuration (`testpaths`,
`pythonpath`, `pytest-xdist` parallelism, markers, logging) migrated
from `osac-test-infra`

### Placement decision

Tests live at repo-root `tests/` (not nested under components). This
preserves the existing import chain (`from tests.core.*`) and pytest
conftest hierarchy with zero refactoring.

### Stack overview

| PR | Suite | Base |
|----|-------|------|
| **1/5 ([this
PR](osac-project#488 (comment) |
**bmaas** + shared infra |
`([main](https://github.com/osac-project/osac/tree/main))` |
| [2/5](osac-project#489) | vmaas | this
branch |
| 3/5 | caas | vmaas branch |
| 4/5 | catalog | caas branch |
| 5/5 | storage | catalog branch |

> **Merge order matters** — this PR must land first since it contains
`pyproject.toml`, `tests/core/`, and the shared `conftest.py` that all
subsequent suites depend on.

## Context

- Jira: [OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593)
- Parent: [OSAC-4255](https://redhat.atlassian.net/browse/OSAC-4255)
- Supersedes: osac-project#409 (abandoned — did not preserve commit history per
reviewer @sk-ilya's
[feedback](osac-project#409 (review)))

## Test plan

- [ ] Verify `git log tests/bmaas/` shows original commit history from
`osac-test-infra`
- [ ] Verify `git log tests/core/` shows original commit history
- [ ] Confirm pytest discovers all bmaas tests: `python -m pytest
tests/bmaas/ --collect-only`
- [ ] Full e2e validation after all 5 PRs are merged (per
[OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593) acceptance
criteria)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added a comprehensive end-to-end testing foundation for compute,
networking, bare-metal, authentication, metering, and lifecycle
workflows.
- Added coverage for networking connectivity, tenant isolation, external
IP behavior, NAT, and resource cleanup.
- Added bare-metal lifecycle, restart, inventory exhaustion,
provisioning, and recovery scenarios.
- Added reusable command-line, API, Kubernetes, authentication, polling,
and metering test utilities.
- **Chores**
- Added project configuration for testing, formatting, linting, and type
checking.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Will Gordon <wgordon@redhat.com>
Signed-off-by: Elad Tabak <etabak@redhat.com>
Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Signed-off-by: Alberto Losada <alosadag@redhat.com>
Signed-off-by: Zoltan Szabo <zszabo@redhat.com>
Signed-off-by: Dakota Crowder <dcrowder@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
Signed-off-by: Nick Carboni <ncarboni@redhat.com>
Signed-off-by: Vladik Romanovsky <vromanso@redhat.com>
Signed-off-by: Tzif <tmorgens@redhat.com>
Signed-off-by: MENNY ABOUSH <maboush@maboush-thinkpadt14gen5.raanaii.csb>
Signed-off-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
Signed-off-by: Marc Sluiter <msluiter@redhat.com>
Signed-off-by: Dan Manor <dmanor@redhat.com>
Co-authored-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
Co-authored-by: openshift-merge-bot[bot] <148852131+openshift-merge-bot[bot]@users.noreply.github.com>
Co-authored-by: Will Gordon <wgordon@redhat.com>
Co-authored-by: Elad Tabak <etabak@redhat.com>
Co-authored-by: Omer Vishlitzky <ovishlit@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Co-authored-by: Juan Hernandez <juan.hernandez@redhat.com>
Co-authored-by: Omer Vishlitzky <22615781+omer-vishlitzky@users.noreply.github.com>
Co-authored-by: Ori Amizur <60868946+ori-amizur@users.noreply.github.com>
Co-authored-by: Dakota Crowder <dcrowder@redhat.com>
Co-authored-by: Alberto Losada <alosadag@redhat.com>
Co-authored-by: Ilya Skornyakov <iskornya@redhat.com>
Co-authored-by: Zoltan Szabo <zszabo@redhat.com>
Co-authored-by: CrystalChun <cchun@redhat.com>
Co-authored-by: Elior Erez <eerez@redhat.com>
Co-authored-by: Crystal <CrystalChun@users.noreply.github.com>
Co-authored-by: Ygal Blum <ygal.blum@gmail.com>
Co-authored-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
Co-authored-by: Ori Amizur <oamizur@redhat.com>
Co-authored-by: Nick Carboni <ncarboni@redhat.com>
Co-authored-by: Vladik Romanovsky <vromanso@redhat.com>
Co-authored-by: Tzif <tmorgens@redhat.com>
Co-authored-by: htayrie-rh <htayrie@redhat.com>
Co-authored-by: Menny Aboush <mennyaboush@gmail.com>
Co-authored-by: MENNY ABOUSH <maboush@maboush-thinkpadt14gen5.raanaii.csb>
Co-authored-by: Daniel Erez <danielerez@gmail.com>
Co-authored-by: Marc Sluiter <msluiter@redhat.com>
Co-authored-by: Siddarth R <sroyapal@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Adrien Gentil <agentil@redhat.com>
Co-authored-by: Deivanai Murugappan Rani <dmurugap@redhat.com>
Co-authored-by: Dan Manor <dmanor@redhat.com>
Co-authored-by: Chai Bot <ship-help-github@redhat.com>
omer-vishlitzky added a commit to amito/osac that referenced this pull request Aug 27, 2026
…sac-project#489)

## Summary

History-preserving migration of the **vmaas** e2e test suite from
[osac-test-infra](https://github.com/osac-project/osac-test-infra) into
this mono-repo. This is **PR 2 of 5** in a stacked series — one per test
suite (bmaas → vmaas → caas → catalog → storage).

Commit history from `osac-test-infra` is preserved via `git
filter-repo`, so `git log tests/vmaas/` shows the original authors and
messages.

### What this PR adds

- **`tests/vmaas/`** — 24 test files covering compute instance lifecycle
(creation, restart, deletion, GPU, heartbeat, metering, disk images,
instance types), networking (virtual networks, subnets, security groups,
external IPs), console access, JWT auth smoke tests, and validation(name
immutability, uniqueness, metadata)
- **`tests/vmaas/external_ip/`** — external IP pool capacity and
lifecycle tests with dedicated `conftest.py` and helpers

### Stack overview

| PR | Suite | Base |
|----|-------|------|
| [1/5](osac-project#488) | bmaas + shared
infra | `main` |
| **2/5 (this PR)** | **vmaas** | bmaas branch |
| 3/5 | caas | this branch |
| 4/5 | catalog | caas branch |
| 5/5 | storage | catalog branch |

## Context

- Jira: [OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593)
- Parent: [OSAC-4255](https://redhat.atlassian.net/browse/OSAC-4255)
- Depends on: osac-project#488 (bmaas — provides `pyproject.toml`, `tests/core/`,
shared `conftest.py`)

## Test plan

- [ ] Verify `git log tests/vmaas/` shows original commit history from
`osac-test-infra`
- [ ] Confirm pytest discovers all vmaas tests: `python -m pytest
tests/vmaas/ --collect-only`
- [ ] Full e2e validation after all 5 PRs are merged (per
[OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593) acceptance
criteria)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
- Added comprehensive end-to-end coverage for virtual networks, subnets,
security groups, disk images, instance types, and compute instances.
- Added external IP pool capacity, allocation, attachment, lifecycle,
and cleanup validation.
- Added compute instance coverage for GPU workloads, restart and stop
behavior, metering, disk images, provisioning, and deletion.
- Added console session tests across WebSocket and gRPC transports,
including ticket and access validation.
- Added authentication, tenant isolation, naming, metadata validation,
and immutability coverage.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Will Gordon <wgordon@redhat.com>
Signed-off-by: Elad Tabak <etabak@redhat.com>
Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Signed-off-by: Alberto Losada <alosadag@redhat.com>
Signed-off-by: Zoltan Szabo <zszabo@redhat.com>
Signed-off-by: Dakota Crowder <dcrowder@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
Signed-off-by: Nick Carboni <ncarboni@redhat.com>
Signed-off-by: Vladik Romanovsky <vromanso@redhat.com>
Signed-off-by: Tzif <tmorgens@redhat.com>
Signed-off-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
Signed-off-by: MENNY ABOUSH <maboush@maboush-thinkpadt14gen5.raanaii.csb>
Signed-off-by: Marc Sluiter <msluiter@redhat.com>
Signed-off-by: Dan Manor <dmanor@redhat.com>
Co-authored-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
Co-authored-by: openshift-merge-bot[bot] <148852131+openshift-merge-bot[bot]@users.noreply.github.com>
Co-authored-by: Will Gordon <wgordon@redhat.com>
Co-authored-by: Elad Tabak <etabak@redhat.com>
Co-authored-by: Omer Vishlitzky <ovishlit@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Co-authored-by: Juan Hernandez <juan.hernandez@redhat.com>
Co-authored-by: Omer Vishlitzky <22615781+omer-vishlitzky@users.noreply.github.com>
Co-authored-by: Ori Amizur <60868946+ori-amizur@users.noreply.github.com>
Co-authored-by: Dakota Crowder <dcrowder@redhat.com>
Co-authored-by: Alberto Losada <alosadag@redhat.com>
Co-authored-by: Ilya Skornyakov <iskornya@redhat.com>
Co-authored-by: Zoltan Szabo <zszabo@redhat.com>
Co-authored-by: CrystalChun <cchun@redhat.com>
Co-authored-by: Elior Erez <eerez@redhat.com>
Co-authored-by: Crystal <CrystalChun@users.noreply.github.com>
Co-authored-by: Ygal Blum <ygal.blum@gmail.com>
Co-authored-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
Co-authored-by: Ori Amizur <oamizur@redhat.com>
Co-authored-by: Nick Carboni <ncarboni@redhat.com>
Co-authored-by: Vladik Romanovsky <vromanso@redhat.com>
Co-authored-by: Tzif <tmorgens@redhat.com>
Co-authored-by: htayrie-rh <htayrie@redhat.com>
Co-authored-by: Menny Aboush <mennyaboush@gmail.com>
Co-authored-by: MENNY ABOUSH <maboush@maboush-thinkpadt14gen5.raanaii.csb>
Co-authored-by: Daniel Erez <danielerez@gmail.com>
Co-authored-by: Marc Sluiter <msluiter@redhat.com>
Co-authored-by: Siddarth R <sroyapal@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Adrien Gentil <agentil@redhat.com>
Co-authored-by: Deivanai Murugappan Rani <dmurugap@redhat.com>
Co-authored-by: Dan Manor <dmanor@redhat.com>
Co-authored-by: Chai Bot <ship-help-github@redhat.com>
omer-vishlitzky added a commit to amito/osac that referenced this pull request Aug 27, 2026
…ac-project#490)

## Summary

History-preserving migration of the **caas** (Cluster as a Service) e2e
test suite from
[osac-test-infra](https://github.com/osac-project/osac-test-infra) into
this mono-repo. This is **PR 3 of 5** in a stacked series — one per test
suite (bmaas → vmaas → caas → catalog → storage).

Commit history from `osac-test-infra` is preserved via `git
filter-repo`, so `git log tests/caas/` shows the original authors and
messages.

### What this PR adds

- **`tests/caas/`** — CaaS cluster lifecycle tests: cluster creation,
deletion feedback, and contract validation with suite-level
`conftest.py`

### Stack overview

| PR | Suite | Base |
|----|-------|------|
| 1/5 | bmaas + shared infra | `main` |
| 2/5 | vmaas | bmaas branch |
| **3/5 (this PR)** | **caas** | vmaas branch |
| 4/5 | catalog | this branch |
| 5/5 | storage | catalog branch |

## Context

- Jira: [OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593)
- Parent: [OSAC-4255](https://redhat.atlassian.net/browse/OSAC-4255)
- Depends on: osac-project#488 (bmaas), PR 2/5 (vmaas)

## Test plan

- [ ] Verify `git log tests/caas/` shows original commit history from
`osac-test-infra`
- [ ] Confirm pytest discovers all caas tests: `python -m pytest
tests/caas/ --collect-only`
- [ ] Full e2e validation after all 5 PRs are merged (per
[OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593) acceptance
criteria)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Added end-to-end coverage for cluster creation, scaling, deletion,
metering, release images, heartbeats, and version validation.
* Added lifecycle checks for cluster deletion through Kubernetes and
gRPC states.
* Added reusable test setup for authentication, namespaces, cluster
templates, pull secrets, and SSH keys.
  * Added validation for required test environment variables.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Will Gordon <wgordon@redhat.com>
Signed-off-by: Elad Tabak <etabak@redhat.com>
Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Signed-off-by: Alberto Losada <alosadag@redhat.com>
Signed-off-by: Zoltan Szabo <zszabo@redhat.com>
Signed-off-by: Dakota Crowder <dcrowder@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
Signed-off-by: Dan Manor <dmanor@redhat.com>
Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
Signed-off-by: Nick Carboni <ncarboni@redhat.com>
Signed-off-by: Vladik Romanovsky <vromanso@redhat.com>
Signed-off-by: Tzif <tmorgens@redhat.com>
Signed-off-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
Signed-off-by: MENNY ABOUSH <maboush@maboush-thinkpadt14gen5.raanaii.csb>
Signed-off-by: Marc Sluiter <msluiter@redhat.com>
Co-authored-by: openshift-merge-bot[bot] <148852131+openshift-merge-bot[bot]@users.noreply.github.com>
Co-authored-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
Co-authored-by: Will Gordon <wgordon@redhat.com>
Co-authored-by: Elad Tabak <etabak@redhat.com>
Co-authored-by: Omer Vishlitzky <ovishlit@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Omer Vishlitzky <22615781+omer-vishlitzky@users.noreply.github.com>
Co-authored-by: Akshay Nadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Co-authored-by: Juan Hernandez <juan.hernandez@redhat.com>
Co-authored-by: Ori Amizur <60868946+ori-amizur@users.noreply.github.com>
Co-authored-by: Dakota Crowder <dcrowder@redhat.com>
Co-authored-by: Alberto Losada <alosadag@redhat.com>
Co-authored-by: Ilya Skornyakov <iskornya@redhat.com>
Co-authored-by: Zoltan Szabo <zszabo@redhat.com>
Co-authored-by: CrystalChun <cchun@redhat.com>
Co-authored-by: Elior Erez <eerez@redhat.com>
Co-authored-by: Crystal <CrystalChun@users.noreply.github.com>
Co-authored-by: Ygal Blum <ygal.blum@gmail.com>
Co-authored-by: Dan Manor <dmanor@redhat.com>
Co-authored-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
Co-authored-by: Ori Amizur <oamizur@redhat.com>
Co-authored-by: Nick Carboni <ncarboni@redhat.com>
Co-authored-by: Vladik Romanovsky <vromanso@redhat.com>
Co-authored-by: Tzif <tmorgens@redhat.com>
Co-authored-by: htayrie-rh <htayrie@redhat.com>
Co-authored-by: Menny Aboush <mennyaboush@gmail.com>
Co-authored-by: MENNY ABOUSH <maboush@maboush-thinkpadt14gen5.raanaii.csb>
Co-authored-by: Daniel Erez <danielerez@gmail.com>
Co-authored-by: Marc Sluiter <msluiter@redhat.com>
Co-authored-by: Siddarth R <sroyapal@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Adrien Gentil <agentil@redhat.com>
Co-authored-by: Deivanai Murugappan Rani <dmurugap@redhat.com>
Co-authored-by: Chai Bot <ship-help-github@redhat.com>
omer-vishlitzky added a commit to amito/osac that referenced this pull request Aug 27, 2026
…sac-project#492)

## Summary

History-preserving migration of the **storage** e2e test suite from
[osac-test-infra](https://github.com/osac-project/osac-test-infra) into
this mono-repo. This is **PR 5 of 5** — the final PR in a stacked
series(bmaas → vmaas → caas → catalog → storage).

Commit history from osac-test-infra is preserved via git filter-repo,so
git log tests/storage/ shows the original authors and messages.

### What this PR adds

- **tests/storage/** — tenant storage lifecycle and CaaS cluster storage
e2e tests with suite-level conftest.py

### Stack overview

| PR | Suite | Base |
|----|-------|------|
| 1/5 | bmaas + shared infra | main |
| 2/5 | vmaas | bmaas branch |
| 3/5 | caas | vmaas branch |
| 4/5 | catalog | caas branch |
| **5/5 (this PR)** | **storage** | catalog branch |

With this PR, all 5 test suites from osac-test-infra are migrated.
Remaining [OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593)
work: update the e2e workflow to run pytest from this repo, validate
with a live e2e run, then remove tests/ from osac-test-infra.

## Context

- Jira: [OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593)
- Parent: [OSAC-4255](https://redhat.atlassian.net/browse/OSAC-4255)
- Depends on: osac-project#488 (bmaas), PRs 2/5 (vmaas), 3/5 (caas), 4/5 (catalog)

## Test plan

- [ ] Verify git log tests/storage/ shows original commit history from
osac-test-infra
- [ ] Confirm pytest discovers all storage tests:  python -m pytest
tests/storage/ --collect-only
- [ ] Full e2e validation after all 5 PRs are merged (per
[OSAC-3593](https://redhat.atlassian.net/browse/OSAC-3593) acceptance
criteria)
- [ ] Update e2e workflow to run pytest from osac checkout
- [ ] Remove tests/ from osac-test-infra after live validation

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Added end-to-end coverage for tenant storage lifecycle management,
including provisioning, readiness checks, storage class validation, and
cleanup.
* Added coverage for CaaS cluster storage creation, health verification,
finalizer handling, and teardown.
* Storage tests now automatically skip when required deployment
configuration or credentials are unavailable.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Signed-off-by: Alberto Losada <alosadag@redhat.com>
Signed-off-by: Alberto Losada Grande <alosadag@redhat.com>
Signed-off-by: Zoltan Szabo <zszabo@redhat.com>
Signed-off-by: Dakota Crowder <dcrowder@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
Signed-off-by: Dan Manor <dmanor@redhat.com>
Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
Signed-off-by: Nick Carboni <ncarboni@redhat.com>
Signed-off-by: Vladik Romanovsky <vromanso@redhat.com>
Signed-off-by: Tzif <tmorgens@redhat.com>
Signed-off-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
Signed-off-by: MENNY ABOUSH <maboush@maboush-thinkpadt14gen5.raanaii.csb>
Signed-off-by: Marc Sluiter <msluiter@redhat.com>
Co-authored-by: Omer Vishlitzky <ovishlit@redhat.com>
Co-authored-by: openshift-merge-bot[bot] <148852131+openshift-merge-bot[bot]@users.noreply.github.com>
Co-authored-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Omer Vishlitzky <22615781+omer-vishlitzky@users.noreply.github.com>
Co-authored-by: Akshay Nadkarni <25892229+akshaynadkarni@users.noreply.github.com>
Co-authored-by: Juan Hernandez <juan.hernandez@redhat.com>
Co-authored-by: Ori Amizur <60868946+ori-amizur@users.noreply.github.com>
Co-authored-by: Dakota Crowder <dcrowder@redhat.com>
Co-authored-by: Elad Tabak <etabak@redhat.com>
Co-authored-by: Alberto Losada <alosadag@redhat.com>
Co-authored-by: Ilya Skornyakov <iskornya@redhat.com>
Co-authored-by: Zoltan Szabo <zszabo@redhat.com>
Co-authored-by: CrystalChun <cchun@redhat.com>
Co-authored-by: Elior Erez <eerez@redhat.com>
Co-authored-by: Crystal <CrystalChun@users.noreply.github.com>
Co-authored-by: Ygal Blum <ygal.blum@gmail.com>
Co-authored-by: Dan Manor <dmanor@redhat.com>
Co-authored-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
Co-authored-by: Ori Amizur <oamizur@redhat.com>
Co-authored-by: Nick Carboni <ncarboni@redhat.com>
Co-authored-by: Vladik Romanovsky <vromanso@redhat.com>
Co-authored-by: Tzif <tmorgens@redhat.com>
Co-authored-by: htayrie-rh <htayrie@redhat.com>
Co-authored-by: Menny Aboush <mennyaboush@gmail.com>
Co-authored-by: MENNY ABOUSH <maboush@maboush-thinkpadt14gen5.raanaii.csb>
Co-authored-by: Daniel Erez <danielerez@gmail.com>
Co-authored-by: Marc Sluiter <msluiter@redhat.com>
Co-authored-by: Siddarth R <sroyapal@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Adrien Gentil <agentil@redhat.com>
Co-authored-by: Deivanai Murugappan Rani <dmurugap@redhat.com>
Co-authored-by: Chai Bot <ship-help-github@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.