(t *testing.T)
| 22 | ) |
| 23 | |
| 24 | func TestBackendBlockSearch(t *testing.T) { |
| 25 | t.Parallel() |
| 26 | // Trace |
| 27 | // This is a fully-populated trace that we search for every condition |
| 28 | wantTr := &Trace{ |
| 29 | TraceID: test.ValidTraceID(nil), |
| 30 | StartTimeUnixNano: uint64(1000 * time.Second), |
| 31 | EndTimeUnixNano: uint64(2000 * time.Second), |
| 32 | DurationNano: uint64((100 * time.Millisecond).Nanoseconds()), |
| 33 | RootServiceName: "RootService", |
| 34 | RootSpanName: "RootSpan", |
| 35 | ResourceSpans: []ResourceSpans{ |
| 36 | { |
| 37 | Resource: Resource{ |
| 38 | ServiceName: "myservice", |
| 39 | Attrs: []Attribute{ |
| 40 | attr("bat", "baz"), |
| 41 | attr("cluster", "cluster"), |
| 42 | attr("namespace", "namespace"), |
| 43 | attr("pod", "pod"), |
| 44 | attr("container", "container"), |
| 45 | attr("k8s.cluster.name", "k8scluster"), |
| 46 | attr("k8s.namespace.name", "k8snamespace"), |
| 47 | attr("k8s.pod.name", "k8spod"), |
| 48 | attr("k8s.container.name", "k8scontainer"), |
| 49 | }, |
| 50 | DedicatedAttributes: DedicatedAttributes{ |
| 51 | String01: []string{"dedicated-resource-attr-value-1"}, |
| 52 | String02: []string{"dedicated-resource-attr-value-2"}, |
| 53 | String03: []string{"dedicated-resource-attr-value-3"}, |
| 54 | String04: []string{"dedicated-resource-attr-value-4"}, |
| 55 | String05: []string{"dedicated-resource-attr-value-5"}, |
| 56 | Int01: []int64{123}, |
| 57 | }, |
| 58 | }, |
| 59 | ScopeSpans: []ScopeSpans{ |
| 60 | { |
| 61 | SpanCount: 1, |
| 62 | Spans: []Span{ |
| 63 | { |
| 64 | Name: "hello", |
| 65 | SpanID: []byte{}, |
| 66 | ParentSpanID: []byte{}, |
| 67 | StatusCode: int(tracev1.Status_STATUS_CODE_ERROR), |
| 68 | Attrs: []Attribute{ |
| 69 | attr("foo", "bar"), |
| 70 | attr("http.method", "get"), |
| 71 | attr("http.url", "url/hello/world"), |
| 72 | attr("http.status_code", 500), |
| 73 | }, |
| 74 | DedicatedAttributes: DedicatedAttributes{ |
| 75 | String01: []string{"dedicated-span-attr-value-1"}, |
| 76 | String02: []string{"dedicated-span-attr-value-2"}, |
| 77 | String03: []string{"dedicated-span-attr-value-3"}, |
| 78 | String04: []string{"dedicated-span-attr-value-4"}, |
| 79 | String05: []string{test.DedicatedBlobTestString()}, |
| 80 | Int01: []int64{456}, |
| 81 | }, |
nothing calls this directly
no test coverage detected