diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8892e7c1..26fd6967 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -226,6 +226,8 @@ jobs: # replace the version value in Cargo.toml with the tag version (so we don't need to create extraneous commits for every preview version) cp Cargo.toml Cargo2.toml sed "0,/^version = \".*\"/s//version = \"$version\"/" Cargo2.toml > Cargo.toml + echo "version = $version" + echo "Cargo $(grep "^version =" Cargo.toml )" working-directory: ${{env.working-directory}} - uses: actions-rs/toolchain@v1 @@ -306,6 +308,8 @@ jobs: # replace the version value in Cargo.toml with the tag version (so we don't need to create extraneous commits for every preview version) cp Cargo.toml Cargo2.toml sed "0,/^version = \".*\"/s//version = \"$version\"/" Cargo2.toml > Cargo.toml + echo "version = $version" + echo "Cargo $(grep "^version =" Cargo.toml )" working-directory: ${{env.working-directory}} - uses: actions-rs/toolchain@v1 diff --git a/README.md b/README.md index 614ae0d5..3e7a1797 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,11 @@ C:\vcpkg> set VCPKGRS_DYNAMIC=1 (or simply set it as your environment variable) ### v0.6.0 Changes: - Major changes: Javascript scripting! +- Updated config-wasm to parse legacy and scripting yaml files Bugs: - Collect returns an array of strings regardless of input type - auto-converter removes code templates. Leave in and TODO -- for_each doesn't let you do templates/js - global loggers may not be running in try script Bug fixes: diff --git a/src/lib.rs b/src/lib.rs index 660a8d7d..6e8e31e4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -478,7 +478,7 @@ async fn _create_run( &env_vars, ) .map_err(Box::new)?; - debug!("config::LoadTest::from_config finished"); + debug!("config::LoadTest::from_config finished: {:?}", config); let test_runner = match exec_config { ExecConfig::Try(t) => { create_try_run_future(config, t, test_ended_tx.clone(), stdout, stderr).map(Either::A) @@ -884,31 +884,32 @@ fn create_try_run_future( let request_body_template = if try_config.skip_body_on { "" } else if matches!(try_config.format, TryRunFormat::Human) { - "\n${if(request.body != '', '${request.body}', '')}\n\n" + "${request.body != '' ? request.body : ''}\n" } else { - r#""body": "request.body""# + r#","body": "request.body""# }; let response_body_template = if try_config.skip_body_on { "" } else if matches!(try_config.format, TryRunFormat::Human) { - "\n${if(response.body != '', '${response.body}', '')}\n\n" + "${response.body != '' ? JSON.stringify(response.body) : ''}\n" } else { - r#""body": "response.body""# + r#","body": "response.body""# }; let select = if matches!(try_config.format, TryRunFormat::Human) { Query::simple( format!( - r#""`\n\ - Request\n\ - ========================================\n\ - ${{request['start-line']}}\n\ - ${{join(request.headers_all, '\n', ': ')}}\n\ - {} - Response (RTT: ${{stats.rtt}}ms)\n\ - ========================================\n\ - ${{response['start-line']}}\n\ - ${{join(response.headers_all, '\n', ': ')}}\n\ - {}`""#, + r#"`\ +Request\n\ +========================================\n\ +${{request['start-line']}}\n\ +${{join(request['headers_all'], '\n', ': ')}}\n\ +{}\ + +Response (RTT: ${{stats.rtt}}ms)\n\ +========================================\n\ +${{response['start-line']}}\n\ +${{join(response.headers_all, '\n', ': ')}}\n\ +{}\n`"#, request_body_template, response_body_template ), vec![], @@ -920,12 +921,12 @@ fn create_try_run_future( r#"{{ "request": {{ "start-line": "request['start-line']", - "headers": "request.headers_all", + "headers": "request.headers_all" {} }}, "response": {{ "start-line": "response['start-line']", - "headers": "response.headers_all", + "headers": "response.headers_all" {} }}, "stats": {{ @@ -937,6 +938,7 @@ fn create_try_run_future( .as_str(), ) }; + debug!("create_try_run_future select: {:?}", select); let to = try_config.file.map_or(LogTo::Stdout, |path| { LogTo::File(Template::new_literal(path)) });