OpenTracing for Fission (#1079)

Added Opentracing integration using opencensus libraries for all Fission components.
This commit is contained in:
Vishal
2019-02-07 11:56:41 +05:30
committed by GitHub
parent 8b0a201f69
commit 5d2abdd95b
29 changed files with 400 additions and 121 deletions
+6 -4
View File
@@ -18,6 +18,7 @@ package client
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"log"
@@ -64,7 +65,8 @@ func TestStorageService(t *testing.T) {
// store it
metadata := make(map[string]string)
fileId, err := client.Upload(tmpfile.Name(), &metadata)
ctx := context.Background()
fileId, err := client.Upload(ctx, tmpfile.Name(), &metadata)
panicIf(err)
// make a temp file for verification
@@ -73,7 +75,7 @@ func TestStorageService(t *testing.T) {
os.Remove(retrievedfile.Name())
// retrieve uploaded file
err = client.Download(fileId, retrievedfile.Name())
err = client.Download(ctx, fileId, retrievedfile.Name())
panicIf(err)
defer os.Remove(retrievedfile.Name())
@@ -87,11 +89,11 @@ func TestStorageService(t *testing.T) {
}
// delete uploaded file
err = client.Delete(fileId)
err = client.Delete(ctx, fileId)
panicIf(err)
// make sure download fails
err = client.Download(fileId, "xxx")
err = client.Download(ctx, fileId, "xxx")
if err == nil {
log.Panic("Download succeeded but file isn't supposed to exist")
}