Skip to content

test(bdd): simplify selected-function identity and instance-state steps #1419

Description

@sbaum1994

Description

The autoscaler and Vanity Gateway BDD smoke scenarios need reusable strict-DSL steps for selected-function identity and compute-plane instance state.

The current scenarios use inline shell commands to:

  • Read the selected function ID and version ID from nvcf-cli status --json and export them for Helm values.
  • Verify that the selected function has no scheduled instances before the first invocation creates demand.
  • Poll nvcf-cli cluster agent get-function until one instance is running.

These are observable CLI workflows, but the JSON parsing and polling mechanics make the feature files harder to read and repeat selected-function identity handling. The shared steps should hide only those mechanics. The selected CLI config, compute-plane context, kubeconfig, expected count and status, timeout, and exported variable names must remain visible in Gherkin.

Definition of Done

  • Add a strict-DSL step that exports the selected function ID and version ID to explicitly named environment variables.
  • Add strict-DSL assertions for the selected function's observable compute-plane instance count and status.
  • Keep the compute-plane context, kubeconfig, expected state, and polling timeout explicit in the feature text.
  • Implement the steps through nvcf-cli command output without inspecting internal service state.
  • Replace the inline identity extraction, zero-instance assertion, and readiness polling shell blocks in the autoscaler and Vanity Gateway smoke scenarios.
  • Add step unit tests and fake-runner wiring coverage.
  • Run go test -short ./... from tests/bdd.

Resources (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions