Skip to content

Commit

Permalink
Set pedantic priority (#285)
Browse files Browse the repository at this point in the history
* Set pedantic priority

* Fix clippy lints

* Satisfy into::<Borrow<_>>
  • Loading branch information
joshwlewis authored Jul 29, 2024
1 parent a94957b commit f51897b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ unused_crate_dependencies = "warn"

[workspace.lints.clippy]
panic_in_result_fn = "warn"
pedantic = "warn"
# The explicit priority is required due to https://github.com/rust-lang/cargo/issues/13565.
pedantic = { level = "warn", priority = -1 }
unwrap_used = "warn"

[profile.release]
Expand Down
24 changes: 12 additions & 12 deletions buildpacks/go/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ impl From<IntegrationTestConfig> for BuildConfig {
}

fn test_go_fixture(fixture: &str, expect_loglines: &[&str], refute_loglines: &[&str]) {
TestRunner::default().build(&IntegrationTestConfig::new(fixture).into(), |ctx| {
let build_config: BuildConfig = IntegrationTestConfig::new(fixture).into();
TestRunner::default().build(build_config, |ctx| {
let logs = format!("{}\n{}", ctx.pack_stdout, ctx.pack_stderr);
for expect_line in expect_loglines {
assert_contains!(logs, expect_line);
Expand Down Expand Up @@ -170,16 +171,14 @@ fn test_basic_http_122() {
#[test]
#[ignore = "integration test"]
fn test_go_artifact_caching() {
TestRunner::default().build(
&IntegrationTestConfig::new("basic_http_116").into(),
|ctx| {
assert_contains!(ctx.pack_stdout, "Installing go1.16.",);
let config = ctx.config.clone();
ctx.rebuild(config, |ctx| {
assert_contains!(ctx.pack_stdout, "Reusing go1.16.");
});
},
);
let build_config: BuildConfig = IntegrationTestConfig::new("basic_http_116").into();
TestRunner::default().build(build_config, |ctx| {
assert_contains!(ctx.pack_stdout, "Installing go1.16.",);
let config = ctx.config.clone();
ctx.rebuild(config, |ctx| {
assert_contains!(ctx.pack_stdout, "Reusing go1.16.");
});
});
}

#[test]
Expand All @@ -191,7 +190,8 @@ fn test_go_binary_arch() {
_ => (["(linux-amd64)", "linux-amd64.tar.gz"], "arm64"),
};

TestRunner::default().build(&integration_config.into(), |ctx| {
let build_config: BuildConfig = integration_config.into();
TestRunner::default().build(build_config, |ctx| {
for contain in contains {
assert_contains!(ctx.pack_stdout, contain);
}
Expand Down

0 comments on commit f51897b

Please sign in to comment.