swarm: integrate OpenTracing; propagate ctx to internal APIs (#17169)
* swarm: propagate ctx, enable opentracing * swarm/tracing: log error when tracing is misconfigured
This commit is contained in:
committed by
Balint Gabor
parent
f7d3678c28
commit
7c9314f231
@ -47,13 +47,13 @@ func TestHasherStore(t *testing.T) {
|
||||
|
||||
// Put two random chunks into the hasherStore
|
||||
chunkData1 := GenerateRandomChunk(int64(tt.chunkLength)).SData
|
||||
key1, err := hasherStore.Put(chunkData1)
|
||||
key1, err := hasherStore.Put(context.TODO(), chunkData1)
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error got \"%v\"", err)
|
||||
}
|
||||
|
||||
chunkData2 := GenerateRandomChunk(int64(tt.chunkLength)).SData
|
||||
key2, err := hasherStore.Put(chunkData2)
|
||||
key2, err := hasherStore.Put(context.TODO(), chunkData2)
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error got \"%v\"", err)
|
||||
}
|
||||
@ -67,7 +67,7 @@ func TestHasherStore(t *testing.T) {
|
||||
}
|
||||
|
||||
// Get the first chunk
|
||||
retrievedChunkData1, err := hasherStore.Get(key1)
|
||||
retrievedChunkData1, err := hasherStore.Get(context.TODO(), key1)
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error, got \"%v\"", err)
|
||||
}
|
||||
@ -78,7 +78,7 @@ func TestHasherStore(t *testing.T) {
|
||||
}
|
||||
|
||||
// Get the second chunk
|
||||
retrievedChunkData2, err := hasherStore.Get(key2)
|
||||
retrievedChunkData2, err := hasherStore.Get(context.TODO(), key2)
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error, got \"%v\"", err)
|
||||
}
|
||||
@ -105,7 +105,7 @@ func TestHasherStore(t *testing.T) {
|
||||
}
|
||||
|
||||
// Check if chunk data in store is encrypted or not
|
||||
chunkInStore, err := chunkStore.Get(hash1)
|
||||
chunkInStore, err := chunkStore.Get(context.TODO(), hash1)
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error got \"%v\"", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user