Skip to content

Commit

Permalink
Issue #371: run all h2spec we can run and still be green (#979)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek authored Mar 10, 2023
1 parent 2a85d02 commit f5078c5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/testcontainers/test_h2spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,15 @@ async fn test_h2spec() {
let skupper_router_image = &env::var("QDROUTERD_IMAGE").unwrap_or(String::from("quay.io/skupper/skupper-router:latest"));
println!("Using router image: {}", skupper_router_image);

// list all available tests by running `podman run --rm -it summerwind/h2spec:2.6.0 --dryrun`
// TODO(ISSUE #371) DISPATCH-1940 [http2] Router HTTP2 adaptor should pass h2spec
let enabled_h2spec_tests = vec!["hpack"]; // this group of tests passes, despite issue
// currently failing tests are generic/4, http2/5, http2/6, http2/7, which must be filtered out here
let enabled_h2spec_tests = [
vec!["--strict".to_string(), "hpack".to_string()],
[2, 4, 5, 6].iter().filter(|i| **i != 4).map(|i| format!("generic/{}", i)).collect::<Vec<_>>(),
(3..=8).filter(|i| *i != 5 && *i != 6 && *i != 7).map(|i| format!("http2/{}", i)).collect::<Vec<_>>(),
].concat();
println!("Going to run these h2spec tests: {:?}", enabled_h2spec_tests);

let docker = Docker::connect_with_local_defaults().unwrap();
let network_name = "test_h2spec_network";
Expand Down Expand Up @@ -147,8 +154,10 @@ async fn test_h2spec() {
let inspection = docker.inspect_container(&*container_skrouterd.id, Some(InspectContainerOptions { size: false })).await.unwrap();
let hostname = inspection.network_settings.unwrap().networks.unwrap().values().take(1).next().unwrap().ip_address.as_ref().unwrap().clone();

let mut h2args = vec!["-h", &hostname, "-p", "24162", "--verbose", "--insecure", "--timeout", "10"];
h2args.extend(enabled_h2spec_tests);
let h2args: Vec<&str> = [
vec!["-h", &hostname, "-p", "24162", "--verbose", "--insecure", "--timeout", "10"],
enabled_h2spec_tests.iter().map(String::as_str).collect()
].concat();
let container_h2spec = create_and_start_container(
&docker, H2SPEC_IMAGE, "h2spec",
Config {
Expand Down

0 comments on commit f5078c5

Please sign in to comment.