#[cfg(all(feature = "anchors", feature = "async"))] #[tokio::test] async fn test_anchors_async() -> anyhow::Result<()> { use docker_compose_spec::DockerCompose; let _ = tracing_subscriber::fmt::try_init(); let doc = DockerCompose::from_path("./tests/docker-compose-to-merge.yml").await; assert!(doc.is_ok()); let svcs = doc?.services; let svc_envs = svcs.clone().get(&"etcd1".into()).map(|s| s.clone().environment.unwrap()); assert!(svc_envs.is_some()); let count = svcs.into_iter().filter(|s| s.1.environment == svc_envs).count(); assert_eq!(count, 3); Ok(()) }