Files
traces/pkg/traceql/enum_attributes_test.go
2a8bc41a1b Add scope parameter to /api/search/tags (#2282)
* added scope to request

Signed-off-by: Joe Elliott <[email protected]>

* move TagValues parse out

Signed-off-by: Joe Elliott <[email protected]>

* Add scope parsing func

Signed-off-by: Joe Elliott <[email protected]>

* wired up stuff. added todos

Signed-off-by: Joe Elliott <[email protected]>

* support resource vs span in the parquet block

Signed-off-by: Joe Elliott <[email protected]>

* Added actual scope support

Signed-off-by: Joe Elliott <[email protected]>

* string -> scope

Signed-off-by: Joe Elliott <[email protected]>

* add virtual intrinsics

Signed-off-by: Joe Elliott <[email protected]>

* changelog+docs

Signed-off-by: Joe Elliott <[email protected]>

* Update docs/sources/tempo/api_docs/_index.md

Co-authored-by: Kim Nylander <[email protected]>

* vparquet2 changes

Signed-off-by: Joe Elliott <[email protected]>

* add an endpoint

Signed-off-by: Joe Elliott <[email protected]>

* improve api. fix panic

Signed-off-by: Joe Elliott <[email protected]>

* define and use all attribute scopes

Signed-off-by: Joe Elliott <[email protected]>

* test

Signed-off-by: Joe Elliott <[email protected]>

* removed load bearing colon

Signed-off-by: Joe Elliott <[email protected]>

* docs

Signed-off-by: Joe Elliott <[email protected]>

* removed silliness

Signed-off-by: Joe Elliott <[email protected]>

* Accept none as well as blank

Signed-off-by: Joe Elliott <[email protected]>

* lint

Signed-off-by: Joe Elliott <[email protected]>

---------

Signed-off-by: Joe Elliott <[email protected]>
Co-authored-by: Kim Nylander <[email protected]>
2023-04-20 16:40:11 -04:00

18 lines
394 B
Go

package traceql
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestAllAttributesString(t *testing.T) {
for _, s := range AllAttributeScopes() {
actual := AttributeScopeFromString(s.String())
require.Equal(t, s, actual)
}
require.Equal(t, AttributeScopeUnknown, AttributeScopeFromString("foo"))
require.Equal(t, AttributeScopeNone, AttributeScopeFromString(""))
}