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

Fix tests to make precommit.sh run on Windows #1831

Merged
merged 7 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions opentelemetry-prometheus/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ fn gather_and_compare(registry: prometheus::Registry, expected: String, name: &'
let metric_families = registry.gather();
encoder.encode(&metric_families, &mut output).unwrap();

let expected = get_platform_specific_string(expected);
lalitb marked this conversation as resolved.
Show resolved Hide resolved
let output_string = get_platform_specific_string(String::from_utf8(output).unwrap());

assert_eq!(output_string, expected, "{name}");
Expand Down Expand Up @@ -812,6 +813,7 @@ fn duplicate_metrics() {
.expected_files
.into_iter()
.map(|f| fs::read_to_string(Path::new("./tests/data").join(f)).expect(f))
.map(get_platform_specific_string)
.collect();
gather_and_compare_multi(registry, possible_matches, tc.name);
}
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-proto/tests/grpc_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const TONIC_INCLUDES: &[&str] = &["src/proto/opentelemetry-proto", "src/proto"];

#[test]
fn build_tonic() {
let before_build = build_content_map(TONIC_OUT_DIR, false);
let before_build = build_content_map(TONIC_OUT_DIR, true);

let out_dir = TempDir::new().expect("failed to create temp dir to store the generated files");

Expand Down
Loading