1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

build: disable cafile_* tests and use slow runners (#9089)

This commit is contained in:
Luca Casonato 2021-01-13 16:48:33 +01:00 committed by GitHub
parent 1728b3ba19
commit 18b3150401
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 26 deletions

View file

@ -17,13 +17,13 @@ jobs:
kind: test_release
- os: windows-2019
kind: test_release
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-18.04' }}
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest' || 'ubuntu-18.04' }}
kind: test_release
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-18.04' }}
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest' || 'ubuntu-18.04' }}
kind: test_debug
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-18.04' }}
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest' || 'ubuntu-18.04' }}
kind: bench
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-18.04' }}
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest' || 'ubuntu-18.04' }}
kind: lint
# Always run master branch builds to completion. This allows the cache to

View file

@ -3269,31 +3269,32 @@ itest!(cache_random_extension {
http_server: true,
});
itest!(cafile_url_imports {
args: "run --quiet --reload --cert tls/RootCA.pem cafile_url_imports.ts",
output: "cafile_url_imports.ts.out",
http_server: true,
});
// TODO(lucacasonato): reenable these tests once we figure out what is wrong with cafile tests
// itest!(cafile_url_imports {
// args: "run --quiet --reload --cert tls/RootCA.pem cafile_url_imports.ts",
// output: "cafile_url_imports.ts.out",
// http_server: true,
// });
itest!(cafile_ts_fetch {
args:
"run --quiet --reload --allow-net --cert tls/RootCA.pem cafile_ts_fetch.ts",
output: "cafile_ts_fetch.ts.out",
http_server: true,
});
// itest!(cafile_ts_fetch {
// args:
// "run --quiet --reload --allow-net --cert tls/RootCA.pem cafile_ts_fetch.ts",
// output: "cafile_ts_fetch.ts.out",
// http_server: true,
// });
itest!(cafile_eval {
args: "eval --cert tls/RootCA.pem fetch('https://localhost:5545/cli/tests/cafile_ts_fetch.ts.out').then(r=>r.text()).then(t=>console.log(t.trimEnd()))",
output: "cafile_ts_fetch.ts.out",
http_server: true,
});
// itest!(cafile_eval {
// args: "eval --cert tls/RootCA.pem fetch('https://localhost:5545/cli/tests/cafile_ts_fetch.ts.out').then(r=>r.text()).then(t=>console.log(t.trimEnd()))",
// output: "cafile_ts_fetch.ts.out",
// http_server: true,
// });
itest!(cafile_info {
args:
"info --quiet --cert tls/RootCA.pem https://localhost:5545/cli/tests/cafile_info.ts",
output: "cafile_info.ts.out",
http_server: true,
});
// itest!(cafile_info {
// args:
// "info --quiet --cert tls/RootCA.pem https://localhost:5545/cli/tests/cafile_info.ts",
// output: "cafile_info.ts.out",
// http_server: true,
// });
itest!(disallow_http_from_https_js {
args: "run --quiet --reload --cert tls/RootCA.pem https://localhost:5545/cli/tests/disallow_http_from_https.js",
@ -3620,6 +3621,7 @@ fn no_validate_asm() {
}
#[test]
#[ignore]
fn cafile_env_fetch() {
use deno_core::url::Url;
let _g = util::http_server();
@ -3640,6 +3642,7 @@ fn cafile_env_fetch() {
}
#[test]
#[ignore]
fn cafile_fetch() {
use deno_core::url::Url;
let _g = util::http_server();
@ -3663,6 +3666,7 @@ fn cafile_fetch() {
}
#[test]
#[ignore]
fn cafile_install_remote_module() {
let _g = util::http_server();
let temp_dir = TempDir::new().expect("tempdir fail");
@ -3684,6 +3688,8 @@ fn cafile_install_remote_module() {
.arg("https://localhost:5545/cli/tests/echo.ts")
.output()
.expect("Failed to spawn script");
println!("{}", std::str::from_utf8(&install_output.stdout).unwrap());
eprintln!("{}", std::str::from_utf8(&install_output.stderr).unwrap());
assert!(install_output.status.success());
let mut echo_test_path = bin_dir.join("echo_test");
@ -3703,6 +3709,7 @@ fn cafile_install_remote_module() {
}
#[test]
#[ignore]
fn cafile_bundle_remote_exports() {
let _g = util::http_server();

View file

@ -699,6 +699,7 @@ async fn wrap_main_https_server() {
let tcp = TcpListener::bind(&main_server_https_addr)
.await
.expect("Cannot bind TCP");
println!("tls ready");
let tls_acceptor = TlsAcceptor::from(tls_config.clone());
// Prepare a long-running future stream to accept and serve cients.
let incoming_tls_stream = async_stream::stream! {
@ -894,9 +895,17 @@ impl HttpServerCount {
let stdout = test_server.stdout.as_mut().unwrap();
use std::io::{BufRead, BufReader};
let lines = BufReader::new(stdout).lines();
let mut ready = false;
let mut tls_ready = false;
for maybe_line in lines {
if let Ok(line) = maybe_line {
if line.starts_with("ready") {
ready = true;
}
if line.starts_with("tls ready") {
tls_ready = true;
}
if ready && tls_ready {
break;
}
} else {