Skip to content

Commit

Permalink
Merge pull request #1099 from Luap99/fixes
Browse files Browse the repository at this point in the history
rust 1.81 lint fixes and remove NOP dhcp test
  • Loading branch information
openshift-merge-bot[bot] authored Oct 16, 2024
2 parents 687f304 + 8114c82 commit 37159a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/network/core_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl CoreUtils {

pub fn decode_address_from_hex(input: &str) -> Result<Vec<u8>, std::io::Error> {
let bytes: Result<Vec<u8>, _> = input
.split(|c| c == ':' || c == '-')
.split([':', '-'])
.map(|b| u8::from_str_radix(b, 16))
.collect();

Expand Down
3 changes: 1 addition & 2 deletions src/network/vlan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ fn setup(
netns
.set_link_name(link.header.index, if_name.to_string())
.wrap(format!("rename tmp {kind_data} interface"))
.map_err(|err| {
.inspect_err(|_| {
// If there is an error here most likely the name in the netns is already used,
// make sure to delete the tmp interface.
if let Err(err) = netns.del_link(netlink::LinkID::ID(link.header.index))
Expand All @@ -346,7 +346,6 @@ fn setup(
kind_data, tmp_name, err
);
};
err
})?;

// successful run, break out of loop
Expand Down
9 changes: 6 additions & 3 deletions test-dhcp/001-basic.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

load helpers

@test "simple example" {

# One might think this is a NOP and does nothing, so do I. But apparently
# something really weird is going with that in CI. If we delete this file
# the basic setup test will fail in CI. No idea why and I tried for to
# long to make any sense of this.
@test "NOP setup" {
:
}

1 comment on commit 37159a8

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

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

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.