Skip to content

Conversation

@refi64
Copy link
Collaborator

@refi64 refi64 commented Jul 30, 2025

As usual, only the last commit is new, depends on #58.

@refi64 refi64 requested a review from sjoerdsimons July 30, 2025 21:59
@refi64 refi64 force-pushed the wip/refi64/commander-tests branch from 2fa48b7 to 4ced142 Compare August 7, 2025 20:41
@sjoerdsimons
Copy link
Contributor

@refi64 as a first pass can you fix CI and the conflicts?

@refi64 refi64 force-pushed the wip/refi64/commander-tests branch from 4ced142 to cb034e3 Compare August 11, 2025 15:13
@refi64
Copy link
Collaborator Author

refi64 commented Aug 11, 2025

@sjoerdsimons conflicts fixed, I don't think clippy latest should matter for this change since it's not part of allgreen?

@refi64 refi64 force-pushed the wip/refi64/commander-tests branch 2 times, most recently from fe73a54 to fb9b128 Compare August 15, 2025 15:18
@refi64 refi64 force-pushed the wip/refi64/commander-tests branch from fb9b128 to 44c397f Compare August 29, 2025 16:20
@refi64 refi64 force-pushed the wip/refi64/commander-tests branch 3 times, most recently from 0a098a8 to 0f81984 Compare September 16, 2025 20:53
let srcmd5_prefix = format!(
"srcmd5 '{}' ",
if log_test == MonitorLogTest::Unavailable {
ZERO_REV_SRCMD5.to_owned()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick; why converting to an owned value if it's being formatting anyway?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dir.srcmd5 in the other branch has its lifetime tied to the dir in the same block, so trying to borrow out of there messes with the lifetimes.

Comment on lines +553 to +558
let prune = context.run().command("prune").go().await;
assert!(!prune.ok());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you use unwrap_err() instead when it fails it will dump what Ok value got returned. If that's not useful at least assert on is_err()`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same pattern in other places)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added docs to the traits as mentioned in the other comment, but rough TL;DR prune isn't actually a Result, it's a custom type representing the result of a command. If it failed, it would have already logged that failure too.

@refi64 refi64 force-pushed the wip/refi64/commander-tests branch 2 times, most recently from 10135e3 to 4661b3f Compare October 7, 2025 22:09
@refi64 refi64 changed the title Refactor integration test core into a new 'obs-commander-tests' crate Refactor integration test core into a new 'obo-tests' crate Oct 7, 2025
refi64 added 2 commits October 7, 2025 17:12
This is largely just a rename, as well as the slightly-silly
`obo-test-support` crate that exists to be depended on by `obo-core`
*and* `obs-gitlab-runner`.
Most of this logic is rather intricate and shareable between multiple
implementations, so it makes sense for them to be in a separate crate.
This necessitates quite a bit of refactoring of the test structure so
that the shared test code can actually run commands and inspect the
logs + artifacts. Since there are various somewhat strange requirements
around command execution (i.e. needing to use timeouts but still get the
result), that API was redone around a builder trait, which also makes it
easy for implementation-specific tests to have their own methods on it.
@refi64 refi64 force-pushed the wip/refi64/commander-tests branch from 4661b3f to 9d78d16 Compare October 7, 2025 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants