Add smoke test for google_set_multiqueue#134
Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
Open
Add smoke test for google_set_multiqueue#134copybara-service[bot] wants to merge 1 commit intomasterfrom
copybara-service[bot] wants to merge 1 commit intomasterfrom
Conversation
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
ea182b8 to
d5636f2
Compare
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
d5636f2 to
98f4173
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add smoke test for google_set_multiqueue
The test runs against input cases in
test_data/, which are expected tocontain:
in/, the test inputscommands.json, exact command invocations to fake usingfake_bin.fs.textproto, a representation of the filesystem to simulate forthe test.
mds.json, the set of all possible Metadata Server queries whichcan be faked by
fake_mds.want/, the test expectationscommands, a simple text file which contains exact commandinvocations which were expected to be sent to
fake_binby thescript under test. Commands
listed here are requred, but additional commands are accepted.
fs.textproto, a representation of files on the disk which weexpect to be in a specific state after the script runs.
Similar to
commands, extra writes are ignored.At runtime, the test:
fake_mds, referencingmds.json.fake_bin, which behaves as describedabove.
curl, if and only if--curl_pathis specified as an argument to the test. Otherwise,the script under test will implicitly use
curlfrom the hostsystem if it exists. This allows testing specific versions of curl,
and is provided for compatibility with Google's internal tooling.
inject the fake filesystem / metadata server into the script under
test.
CLI commands were called, as described above.