Skip to content

Commit

Permalink
Add an otel-cli exec test & remove skip which was causing it to not b…
Browse files Browse the repository at this point in the history
…e run by go test (#84)

* Adds a basic otel-cli exec test.
* Removes an unneeded skip from main_test.go that was causing tests after 80-span-background to not run.
  • Loading branch information
edw-eqix authored Sep 20, 2021
1 parent bf628b5 commit 79798b7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
30 changes: 30 additions & 0 deletions fixtures/90-span-exec-basic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{
"description": "otel-cli exec basic test and stuff",
"config": {
"env": {
"OTEL_EXPORTER_OTLP_ENDPOINT": "{{endpoint}}",
"TRACEPARENT": "00-edededededededededededededed9000-edededededededed-01"
},
"cli_args": [
"exec",
"--service",
"main_test.go",
"--name",
"test-span-123",
"--kind",
"server",
"echo hello world"
]
},
"expect": {
"output": "hello world\n",
"spans": 2,
"span_data": {
"trace_id": "edededededededededededededed9000",
"span_id": "*",
"is_sampled": "true"
}
}
}
]
1 change: 0 additions & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ func TestOtelCli(t *testing.T) {
t.Fatalf("BUG in test or fixture: unexpected foreground fixture done chan named %q", fixture.Description)
}

t.Skipf("[%s] fixture %q foregrounded", fixture.Filename, fixture.Description)
continue fixtures
}

Expand Down

0 comments on commit 79798b7

Please sign in to comment.