You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use hickory_resolver::config::{ResolverConfig,ResolverOpts};
606
+
use test_case::test_case;
607
+
608
+
constCLIENT_POD_IP:&str = "10.0.0.1";
609
+
610
+
constSERVER_POD_IP:&str = "10.0.0.2";
611
+
constSERVER_SVC_IP:&str = "10.10.0.1";
612
+
613
+
constWAYPOINT_POD_IP:&str = "10.0.0.3";
614
+
constWAYPOINT_SVC_IP:&str = "10.10.0.2";
615
+
616
+
constHBONE_TARGET_PORT:u16 = 8080;
617
+
618
+
// Regular zTunnel workload traffic inbound
619
+
#[test_case(Waypoint::None,SERVER_POD_IP,SERVER_POD_IP,Some((SERVER_POD_IP,HBONE_TARGET_PORT));"to workload no waypoint")]
620
+
// Waypoint is referenced directly by Pod IP
621
+
#[test_case(Waypoint::Workload(WAYPOINT_POD_IP),WAYPOINT_POD_IP,SERVER_POD_IP,Some((WAYPOINT_POD_IP,HBONE_TARGET_PORT));"to workload with waypoint pod")]
622
+
#[test_case(Waypoint::Workload(WAYPOINT_SVC_IP),WAYPOINT_POD_IP,SERVER_POD_IP,Some((WAYPOINT_POD_IP,HBONE_TARGET_PORT));"to workload with waypoint svc")]
623
+
// Waypoint is referenced through it's service VIP
624
+
#[test_case(Waypoint::Service(WAYPOINT_POD_IP),WAYPOINT_POD_IP,SERVER_SVC_IP,Some((WAYPOINT_POD_IP,HBONE_TARGET_PORT));"to service with waypoint pod")]
625
+
#[test_case(Waypoint::Service(WAYPOINT_SVC_IP),WAYPOINT_POD_IP,SERVER_SVC_IP,Some((WAYPOINT_POD_IP,HBONE_TARGET_PORT));"to service with waypoint svc")]
626
+
// Error cases
627
+
#[test_case(Waypoint::None,SERVER_POD_IP,CLIENT_POD_IP,None;"to server ip mismatch")]
628
+
#[tokio::test]
629
+
asyncfntest_find_inbound_upstream<'a>(
630
+
target_waypoint:Waypoint<'a>,
631
+
connection_dst:&str,
632
+
hbone_dst:&str,
633
+
want:Option<(&str,u16)>,
634
+
){
635
+
let state = test_state(target_waypoint).expect("state setup");
0 commit comments