Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuajerin committed Sep 26, 2024
1 parent 2337036 commit 8dfadc3
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions tembo-operator/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2235,14 +2235,63 @@ mod test {
"true"
);

let annotations = service
.metadata
.annotations
.as_ref()
.expect("Annotations should be present");
let basedomain = std::env::var("DATA_PLANE_BASEDOMAIN").unwrap();
let expected_hostname = format!("dedicated-ro.{}.{}", namespace, basedomain);

assert_eq!(
annotations
.get("external-dns.alpha.kubernetes.io/hostname")
.expect("Hostname annotation should be present"),
&expected_hostname
);

assert_eq!(
annotations
.get("service.beta.kubernetes.io/aws-load-balancer-internal")
.expect("AWS LB internal annotation should be present"),
&serde_json::Value::String("false".to_string())
);

assert_eq!(
annotations
.get("service.beta.kubernetes.io/aws-load-balancer-scheme")
.expect("AWS LB scheme annotation should be present"),
&serde_json::Value::String("internet-facing".to_string())
);

assert_eq!(
annotations
.get("service.beta.kubernetes.io/aws-load-balancer-nlb-target-type")
.expect("AWS LB NLB target type annotation should be present"),
&serde_json::Value::String("ip".to_string())
);

assert_eq!(
annotations
.get("service.beta.kubernetes.io/aws-load-balancer-type")
.expect("AWS LB type annotation should be present"),
&serde_json::Value::String("nlb-ip".to_string())
);

assert_eq!(
annotations
.get("service.beta.kubernetes.io/aws-load-balancer-healthcheck-protocol")
.expect("AWS LB healthcheck protocol annotation should be present"),
&serde_json::Value::String("TCP".to_string())
);

assert_eq!(
annotations
.get("service.beta.kubernetes.io/aws-load-balancer-healthcheck-port")
.expect("AWS LB healthcheck port annotation should be present"),
&serde_json::Value::String("5432".to_string())
);

// Disable dedicated networking
let coredb_json = serde_json::json!({
"apiVersion": API_VERSION,
Expand Down

0 comments on commit 8dfadc3

Please sign in to comment.