Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
moved test cases file to testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Kanzhelev committed Sep 24, 2018
1 parent be2ee77 commit 9b852aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions plugin/ochttp/testdata/download-test-cases.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This script downloads latest test cases from specs

# TODO: change the link to when test cases are merged to specs repo

curl https://raw.githubusercontent.com/SergeyKanzhelev/opencensus-specs/sergkanz/tes-cases-for-http/trace/http-out-test-cases.json -o http-out-test-cases.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[
{
"name": "Successfull GET call to https://example.com",
"name": "Successful GET call to https://example.com",
"method": "GET",
"url": "https://example.com/",
"spanName": "/",
"spanStatus": "OK",
"spanKind": "Client",
"spanKind": "Client",
"spanAttributes": {
"http.path": "/",
"http.method": "GET",
Expand Down
2 changes: 1 addition & 1 deletion plugin/ochttp/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ func TestAgainstSpecs(t *testing.T) {

fmt.Println("start")

dat, err := ioutil.ReadFile("http-out-test-cases.json")
dat, err := ioutil.ReadFile("testdata/http-out-test-cases.json")
if err != nil {
t.Fatalf("error reading file: %v", err)
}
Expand Down

0 comments on commit 9b852aa

Please sign in to comment.