Skip to content

Conversation

@Daanvdplas
Copy link
Collaborator

@Daanvdplas Daanvdplas commented Sep 18, 2025

Todo:

  • set up integration tests
  • Versioning in telemetry payload
  • No separation here, execute the command and get the command executed back.
  • If an error occurs, the above should still hold.

@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.15%. Comparing base (8dd893c) to head (832ee4a).

Files with missing lines Patch % Lines
crates/pop-cli/src/main.rs 0.00% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main     #635      +/-   ##
==========================================
- Coverage   78.16%   78.15%   -0.01%     
==========================================
  Files         109      109              
  Lines       25464    25465       +1     
  Branches    25464    25465       +1     
==========================================
  Hits        19903    19903              
- Misses       3481     3482       +1     
  Partials     2080     2080              
Files with missing lines Coverage Δ
crates/pop-telemetry/src/lib.rs 89.91% <100.00%> (ø)
crates/pop-cli/src/main.rs 87.71% <0.00%> (-0.38%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

glob = { version = "0.3.1", default-features = false }
log = { version = "0.4.20", default-features = false }
mockito = { version = "1.4.0", default-features = false }
wiremock = { version = "0.6.0", default-features = false }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tried axum or mockito crate but it was super hard to assert on the payload send to the mockserver. So ended up using wiremock.

@Daanvdplas Daanvdplas requested a review from AlexD10S September 23, 2025 07:22
}
}

pub fn cleanup_telemetry_env() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we get back the variables removed in new?

std::env::remove_var("DO_NOT_TRACK");
std::env::remove_var("CI");

}

/// Create a `pop` command configured for `dir` with given `args`.
pub fn pop(dir: &Path, args: impl IntoIterator<Item = impl AsRef<OsStr>>) -> StdCommand {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We did this refactor in the tests, once you merge all changes you can take it from: https://github.com/r0gue-io/pop-cli/blob/main/crates/pop-common/src/lib.rs#L94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants