Skip to content

Commit

Permalink
enable e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Jan 13, 2022
1 parent b8fc551 commit 7f46110
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: codecov
on:
pull_request:
push:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: agent-test-tool

on:
pull_request:
push:
branches:
- master
tags:
- 'v*'

jobs:
e2e-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Prepare service container
run: docker-compose -f docker-compose.e2e.yml up -d
- name: Run e2e
run: |
pip3 install --upgrade pip
pip3 install setuptools
pip3 install -r requirements.txt
python3 tests/e2e/run_e2e.py --expected_file=tests/e2e/data/expected.yaml --max_retry_times=3 --target_path=/ping
4 changes: 3 additions & 1 deletion tests/e2e/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions tests/e2e/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use skywalking_rust::context::propagation::encoder::encode_propagation;
use skywalking_rust::context::trace_context::TracingContext;
use skywalking_rust::reporter::grpc::Reporter;
use std::convert::Infallible;
use std::error::Error;
use std::net::SocketAddr;
use structopt::StructOpt;
use tokio::sync::mpsc;
Expand Down Expand Up @@ -123,7 +124,7 @@ struct Opt {
}

#[tokio::main]
async fn main() {
async fn main() -> Result<(), Box<dyn Error>> {
let opt = Opt::from_args();
let reporter = Reporter::start("http://collector:19876").await;
let tx = reporter.sender();
Expand All @@ -134,5 +135,6 @@ async fn main() {
run_producer_service([0, 0, 0, 0], tx).await;
}

reporter.shutdown().await.unwarp();
reporter.shutdown().await?;
Ok(())
}

0 comments on commit 7f46110

Please sign in to comment.