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 function typo noticed in test #1322

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions src/inpod/statemanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ impl WorkloadProxyManagerState {
#[cfg(test)]
mod tests {
use super::*;
use crate::inpod::test_helpers::{self, create_proxy_confilct, new_netns, uid};
use crate::inpod::test_helpers::{self, create_proxy_conflict, new_netns, uid};
use crate::inpod::WorkloadData;

use crate::inpod::istio::zds;
Expand Down Expand Up @@ -471,7 +471,7 @@ mod tests {
let mut state = fixture.state;
let ns = new_netns();
// to make the proxy fail, bind to its ports in its netns
let sock = create_proxy_confilct(&ns);
let sock = create_proxy_conflict(&ns);

let data = WorkloadData {
netns: ns,
Expand Down Expand Up @@ -506,7 +506,7 @@ mod tests {
let ns1 = new_netns();
let ns2 = new_netns();
// to make the proxy fail, bind to its ports in its netns
let _sock = create_proxy_confilct(&ns1);
let _sock = create_proxy_conflict(&ns1);

// Add the pod in netns1
let ret = state
Expand Down Expand Up @@ -542,7 +542,7 @@ mod tests {

let ns = new_netns();
// to make the proxy fail, bind to its ports in its netns
let _sock = create_proxy_confilct(&ns);
let _sock = create_proxy_conflict(&ns);

let data = WorkloadData {
netns: ns,
Expand Down
2 changes: 1 addition & 1 deletion src/inpod/test_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub async fn send_workload_del(s: &mut UnixStream, uid: super::WorkloadUid) {
.expect("failed to sendmsg");
}

pub fn create_proxy_confilct(ns: &std::os::fd::OwnedFd) -> std::os::fd::OwnedFd {
pub fn create_proxy_conflict(ns: &std::os::fd::OwnedFd) -> std::os::fd::OwnedFd {
let inpodns = InpodNetns::new(
Arc::new(crate::inpod::netns::InpodNetns::current().unwrap()),
ns.try_clone().unwrap(),
Expand Down
4 changes: 2 additions & 2 deletions src/inpod/workloadmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ pub(crate) mod tests {
use super::*;

use crate::inpod::test_helpers::{
self, create_proxy_confilct, new_netns, read_hello, read_msg, send_snap_sent,
self, create_proxy_conflict, new_netns, read_hello, read_msg, send_snap_sent,
send_workload_added, send_workload_del, uid,
};

Expand Down Expand Up @@ -505,7 +505,7 @@ pub(crate) mod tests {
let mut state = f.state;

let podns = new_netns();
let socket = create_proxy_confilct(&podns);
let socket = create_proxy_conflict(&podns);

let server = tokio::spawn(async move {
read_hello(&mut s2).await;
Expand Down