Skip to content

test: add a gateway integration test for launched-driver failures #5934

Backlog

Description

@elezar

User Story

I operate a gateway that launches compute drivers as subprocesses. I need config preflight and startup to report a driver's rejected configuration reliably, so that a broken driver table never leaves me with a half-configured gateway.

Description

The gateway launches the VM, Podman, and Docker drivers and maps each driver's exit status to what it does next. Add integration tests that run the real openshell-gateway binary against a fake driver binary and check each outcome of that contract:

  • exit 78 (invalid table): config preflight fails with category=malformed and leaves the config file unchanged, and startup fails with the driver's reason;
  • exit 69 (backend unavailable): auto-detection falls through to the next candidate, and a driver named explicitly fails startup;
  • any other nonzero exit, or death by signal: startup stops instead of falling through to another driver, whatever the driver's JSON line says;
  • a driver that exits after it starts serving makes the gateway exit nonzero.

Context

Before the launch contract, the gateway linked the Docker and Podman drivers and an integration test (proxy_config_preflight.rs) checked that an invalid driver table failed preflight and startup. The drivers now validate their own tables, so that test was removed and the driver crates test their own validation. Nothing yet checks the gateway's handling of the launch contract end to end. The existing config_preflight.rs tests already use fake driver scripts that can be extended.

Definition of Done

  • Fake-driver tests cover the exit statuses and outcomes listed above, for preflight, startup, and auto-detection.
  • The tests are named for the contract, not for one driver's validation.
  • Fake scripts are installed by write-then-rename to avoid ETXTBSY under parallel tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions