Skip to content

Add smoke test for google_set_multiqueue#134

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_840460303
Open

Add smoke test for google_set_multiqueue#134
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_840460303

Conversation

@copybara-service
Copy link
Copy Markdown

Add smoke test for google_set_multiqueue

The test runs against input cases in test_data/, which are expected to
contain:

  • in/, the test inputs
    • commands.json, exact command invocations to fake using fake_bin.
    • fs.textproto, a representation of the filesystem to simulate for
      the test.
    • mds.json, the set of all possible Metadata Server queries which
      can be faked by fake_mds.
  • want/, the test expectations
    • commands, a simple text file which contains exact command
      invocations which were expected to be sent to fake_bin by the
      script under test. Commands
      listed here are requred, but additional commands are accepted.
    • fs.textproto, a representation of files on the disk which we
      expect to be in a specific state after the script runs.
      Similar to commands, extra writes are ignored.

At runtime, the test:

  • Starts an instance of fake_mds, referencing mds.json.
    • The ephemeral port which the server bound to is printed to stdout
  • Sets up a directory for fake binaries.
    • Most of these are symlinks to fake_bin, which behaves as described
      above.
    • We additionally inject a link to curl, if and only if
      --curl_path is specified as an argument to the test. Otherwise,
      the script under test will implicitly use curl from the host
      system if it exists. This allows testing specific versions of curl,
      and is provided for compatibility with Google's internal tooling.
  • Sets some environment variables to configure the test tools and to
    inject the fake filesystem / metadata server into the script under
    test.
  • Runs the script under test.
  • Asserts that expected modifications to the filesystem, and specific
    CLI commands were called, as described above.

@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: copybara-service[bot]

The full list of commands accepted by this bot can be found 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

@copybara-service copybara-service bot force-pushed the test_840460303 branch 3 times, most recently from ea182b8 to d5636f2 Compare December 5, 2025 21:48
The test runs against input cases in `test_data/`, which are expected to
contain:

- `in/`, the test inputs
  - `commands.json`, exact command invocations to fake using `fake_bin`.
  - `fs.textproto`, a representation of the filesystem to simulate for
    the test.
  - `mds.json`, the set of all possible Metadata Server queries which
    can be faked by `fake_mds`.
- `want/`, the test expectations
  - `commands`, a simple text file which contains exact command
    invocations which were expected to be sent to `fake_bin` by the
    script under test. Commands
    listed here are requred, but additional commands are accepted.
  - `fs.textproto`, a representation of files on the disk which we
    expect to be in a specific state after the script runs.
    Similar to `commands`, extra writes are ignored.

At runtime, the test:

- Starts an instance of `fake_mds`, referencing `mds.json`.
  - The ephemeral port which the server bound to is printed to stdout
- Sets up a directory for fake binaries.
  - Most of these are symlinks to `fake_bin`, which behaves as described
    above.
  - We additionally inject a link to `curl`, if and only if
    `--curl_path` is specified as an argument to the test. Otherwise,
    the script under test will implicitly use `curl` from the host
    system if it exists. This allows testing specific versions of curl,
    and is provided for compatibility with Google's internal tooling.
- Sets some environment variables to configure the test tools and to
  inject the fake filesystem / metadata server into the script under
  test.
- Runs the script under test.
- Asserts that expected modifications to the filesystem, and specific
  CLI commands were called, as described above.

PiperOrigin-RevId: 840460303
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants