Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update to snapbox 0.6 #13963

Merged
merged 6 commits into from
May 28, 2024
Merged

chore: Update to snapbox 0.6 #13963

merged 6 commits into from
May 28, 2024

Conversation

epage
Copy link
Contributor

@epage epage commented May 24, 2024

What does this PR try to resolve?

This unblocks regex redactions which will help with Finished in 3.45s messages as well as maybe switching away from compare.rs generally.

How should we test and review this PR?

Additional information

@rustbot
Copy link
Collaborator

rustbot commented May 24, 2024

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-cli-help Area: built-in command-line help A-credential-provider Area: credential provider for storing and retreiving credentials A-manifest Area: Cargo.toml issues A-testing-cargo-itself Area: cargo's tests A-unstable Area: nightly unstable support S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 24, 2024
credential/cargo-credential/tests/examples.rs Outdated Show resolved Hide resolved
@epage epage force-pushed the snapbox branch 3 times, most recently from 1f61285 to 62cd5b5 Compare May 27, 2024 15:18
@epage epage force-pushed the snapbox branch 2 times, most recently from d4ea372 to 93a9e97 Compare May 27, 2024 15:45
@epage epage marked this pull request as draft May 28, 2024 01:59
epage added 3 commits May 27, 2024 21:24
We needed to tweak the redactions because snapbox no longer normalizes
slashes on redactions unless the data type is a `PathBuf`.
@epage epage marked this pull request as ready for review May 28, 2024 03:03
@epage
Copy link
Contributor Author

epage commented May 28, 2024

@weihanglo looks like I've finished working out the kinks

@weihanglo
Copy link
Member

Great job and thank you!

@bors r+

@bors
Copy link
Contributor

bors commented May 28, 2024

📌 Commit 9af864e has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 28, 2024
@bors
Copy link
Contributor

bors commented May 28, 2024

⌛ Testing commit 9af864e with merge 11d0002...

@bors
Copy link
Contributor

bors commented May 28, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 11d0002 to master...

@bors bors merged commit 11d0002 into rust-lang:master May 28, 2024
23 checks passed
@epage epage deleted the snapbox branch May 28, 2024 14:02
bors added a commit to rust-lang-ci/rust that referenced this pull request May 28, 2024
Update cargo

5 commits in a8d72c675ee52dd57f0d8f2bae6655913c15b2fb..431db31d0dbeda320caf8ef8535ea48eb3093407
2024-05-24 03:34:17 +0000 to 2024-05-28 18:17:31 +0000
- Include `lints.rust.unexpected_cfgs.check-cfg` in the fingerprint (rust-lang/cargo#13958)
- feat(test): Auto-redact elapsed time (rust-lang/cargo#13973)
- chore: Update to snapbox 0.6 (rust-lang/cargo#13963)
- fix: check if rev is full commit sha for github fast path (rust-lang/cargo#13969)
- test: switch from `drop` to `let _` due to nightly rustc change (rust-lang/cargo#13964)

r? ghost
@ehuss ehuss added this to the 1.80.0 milestone Jun 2, 2024
bors added a commit that referenced this pull request Jun 2, 2024
refactor: Transition direct assertions from cargo-test-support to snapbox

### What does this PR try to resolve?

Cargo has a bespoke testing framework for functional tests
- Extra stuff for us to maintain
- Don't leverage benefits from contributions related to other projects
- Less incentive to be thoroughly documented

UI tests are written using snapbox.  The latest release of snapbox (#13963) was geared at supporting cargo's needs in the hope that we can consolidate on testing frameworks.

Besides having a single set of semantics, benefits we'd gain include
- Updating of test snapshots
- Fancier redacting of test output (e.g. #13973)

This is the first incremental step in this direction.  This replaces direct assertions with snapbox assertions.  This still leaves all of the CLI output assertions. These will be done incrementally.

### How should we test and review this PR?

### Additional information
bors added a commit that referenced this pull request Jun 2, 2024
refactor: Transition direct assertions from cargo-test-support to snapbox

### What does this PR try to resolve?

Cargo has a bespoke testing framework for functional tests
- Extra stuff for us to maintain
- Don't leverage benefits from contributions related to other projects
- Less incentive to be thoroughly documented

UI tests are written using snapbox.  The latest release of snapbox (#13963) was geared at supporting cargo's needs in the hope that we can consolidate on testing frameworks.

Besides having a single set of semantics, benefits we'd gain include
- Updating of test snapshots
- Fancier redacting of test output (e.g. #13973)

This is the first incremental step in this direction.  This replaces direct assertions with snapbox assertions.  This still leaves all of the CLI output assertions. These will be done incrementally.

### How should we test and review this PR?

### Additional information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli-help Area: built-in command-line help A-credential-provider Area: credential provider for storing and retreiving credentials A-manifest Area: Cargo.toml issues A-testing-cargo-itself Area: cargo's tests A-unstable Area: nightly unstable support S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants