1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -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 kind: test_release
- os: windows-2019 - os: windows-2019
kind: test_release 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 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 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 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 kind: lint
# Always run master branch builds to completion. This allows the cache to # 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, http_server: true,
}); });
itest!(cafile_url_imports { // TODO(lucacasonato): reenable these tests once we figure out what is wrong with cafile tests
args: "run --quiet --reload --cert tls/RootCA.pem cafile_url_imports.ts", // itest!(cafile_url_imports {
output: "cafile_url_imports.ts.out", // args: "run --quiet --reload --cert tls/RootCA.pem cafile_url_imports.ts",
http_server: true, // output: "cafile_url_imports.ts.out",
}); // http_server: true,
// });
itest!(cafile_ts_fetch { // itest!(cafile_ts_fetch {
args: // args:
"run --quiet --reload --allow-net --cert tls/RootCA.pem cafile_ts_fetch.ts", // "run --quiet --reload --allow-net --cert tls/RootCA.pem cafile_ts_fetch.ts",
output: "cafile_ts_fetch.ts.out", // output: "cafile_ts_fetch.ts.out",
http_server: true, // http_server: true,
}); // });
itest!(cafile_eval { // 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()))", // 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", // output: "cafile_ts_fetch.ts.out",
http_server: true, // http_server: true,
}); // });
itest!(cafile_info { // itest!(cafile_info {
args: // args:
"info --quiet --cert tls/RootCA.pem https://localhost:5545/cli/tests/cafile_info.ts", // "info --quiet --cert tls/RootCA.pem https://localhost:5545/cli/tests/cafile_info.ts",
output: "cafile_info.ts.out", // output: "cafile_info.ts.out",
http_server: true, // http_server: true,
}); // });
itest!(disallow_http_from_https_js { itest!(disallow_http_from_https_js {
args: "run --quiet --reload --cert tls/RootCA.pem https://localhost:5545/cli/tests/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] #[test]
#[ignore]
fn cafile_env_fetch() { fn cafile_env_fetch() {
use deno_core::url::Url; use deno_core::url::Url;
let _g = util::http_server(); let _g = util::http_server();
@ -3640,6 +3642,7 @@ fn cafile_env_fetch() {
} }
#[test] #[test]
#[ignore]
fn cafile_fetch() { fn cafile_fetch() {
use deno_core::url::Url; use deno_core::url::Url;
let _g = util::http_server(); let _g = util::http_server();
@ -3663,6 +3666,7 @@ fn cafile_fetch() {
} }
#[test] #[test]
#[ignore]
fn cafile_install_remote_module() { fn cafile_install_remote_module() {
let _g = util::http_server(); let _g = util::http_server();
let temp_dir = TempDir::new().expect("tempdir fail"); 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") .arg("https://localhost:5545/cli/tests/echo.ts")
.output() .output()
.expect("Failed to spawn script"); .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()); assert!(install_output.status.success());
let mut echo_test_path = bin_dir.join("echo_test"); let mut echo_test_path = bin_dir.join("echo_test");
@ -3703,6 +3709,7 @@ fn cafile_install_remote_module() {
} }
#[test] #[test]
#[ignore]
fn cafile_bundle_remote_exports() { fn cafile_bundle_remote_exports() {
let _g = util::http_server(); 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) let tcp = TcpListener::bind(&main_server_https_addr)
.await .await
.expect("Cannot bind TCP"); .expect("Cannot bind TCP");
println!("tls ready");
let tls_acceptor = TlsAcceptor::from(tls_config.clone()); let tls_acceptor = TlsAcceptor::from(tls_config.clone());
// Prepare a long-running future stream to accept and serve cients. // Prepare a long-running future stream to accept and serve cients.
let incoming_tls_stream = async_stream::stream! { let incoming_tls_stream = async_stream::stream! {
@ -894,9 +895,17 @@ impl HttpServerCount {
let stdout = test_server.stdout.as_mut().unwrap(); let stdout = test_server.stdout.as_mut().unwrap();
use std::io::{BufRead, BufReader}; use std::io::{BufRead, BufReader};
let lines = BufReader::new(stdout).lines(); let lines = BufReader::new(stdout).lines();
let mut ready = false;
let mut tls_ready = false;
for maybe_line in lines { for maybe_line in lines {
if let Ok(line) = maybe_line { if let Ok(line) = maybe_line {
if line.starts_with("ready") { if line.starts_with("ready") {
ready = true;
}
if line.starts_with("tls ready") {
tls_ready = true;
}
if ready && tls_ready {
break; break;
} }
} else { } else {