Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

on: [push, pull_request]

jobs:
build_and_test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Run cargo clippy
run: cargo clippy -- -D warnings

- name: Run cargo test
run: cargo test
12 changes: 3 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ impl ProxyServer {
.with_single_cert(cert_chain.clone(), key)
.expect("Failed to create rustls server config");

let server =
Self::new_with_tls_config(cert_chain, server_config.into(), local, target).await;

server
Self::new_with_tls_config(cert_chain, server_config.into(), local, target).await
}

/// Start with preconfigured TLS
Expand Down Expand Up @@ -133,10 +130,7 @@ impl ProxyClient {
.with_root_certificates(root_store)
.with_no_client_auth();

let client =
Self::new_with_tls_config(client_config.into(), address, server_address, server_name)
.await;
client
Self::new_with_tls_config(client_config.into(), address, server_address, server_name).await
}

pub async fn new_with_tls_config(
Expand All @@ -151,7 +145,7 @@ impl ProxyClient {
Self {
connector,
listener,
target: target.into(),
target,
target_name,
attestation_platform: MockAttestation,
}
Expand Down