1- package otelcomponentmapping
1+ package otelcomponentmapping_test
22
33import (
44 "testing"
55
6- "github.com/stackvista/stackstate-cli/cmd/otelmapping"
6+ "github.com/stackvista/stackstate-cli/cmd/otelcomponentmapping"
7+ "github.com/stackvista/stackstate-cli/cmd/otelmapping_test"
78 "github.com/stackvista/stackstate-cli/internal/di"
89 "github.com/stackvista/stackstate-cli/internal/printer"
910 "github.com/stretchr/testify/assert"
1011)
1112
1213func TestOtelComponentMappingStatusJson (t * testing.T ) {
1314 cli := di .NewMockDeps (t )
14- cmd := OtelComponentMappingStatusCommand (& cli .Deps )
15- cli .MockClient .ApiMocks .OtelMappingApi .GetOtelComponentMappingStatusResponse .Result = * otelmapping .TestSomeOtelMappingStatus
15+ cmd := otelcomponentmapping . OtelComponentMappingStatusCommand (& cli .Deps )
16+ cli .MockClient .ApiMocks .OtelMappingApi .GetOtelComponentMappingStatusResponse .Result = * otelmapping_test .TestSomeOtelMappingStatus
1617
1718 di .ExecuteCommandWithContextUnsafe (& cli .Deps , cmd , "--identifier" , "identifier" , "-o" , "json" )
1819
@@ -21,7 +22,7 @@ func TestOtelComponentMappingStatusJson(t *testing.T) {
2122
2223 expected := []map [string ]interface {}{
2324 {
24- "otel-component-mapping" : otelmapping .TestSomeOtelMappingStatus ,
25+ "otel-component-mapping" : otelmapping_test .TestSomeOtelMappingStatus ,
2526 },
2627 }
2728
@@ -30,8 +31,8 @@ func TestOtelComponentMappingStatusJson(t *testing.T) {
3031
3132func TestOtelComponentMappingStatusTable (t * testing.T ) {
3233 cli := di .NewMockDeps (t )
33- cmd := OtelComponentMappingStatusCommand (& cli .Deps )
34- cli .MockClient .ApiMocks .OtelMappingApi .GetOtelComponentMappingStatusResponse .Result = * otelmapping .TestSomeOtelMappingStatus
34+ cmd := otelcomponentmapping . OtelComponentMappingStatusCommand (& cli .Deps )
35+ cli .MockClient .ApiMocks .OtelMappingApi .GetOtelComponentMappingStatusResponse .Result = * otelmapping_test .TestSomeOtelMappingStatus
3536
3637 di .ExecuteCommandWithContextUnsafe (& cli .Deps , cmd , "--identifier" , "identifier" )
3738
@@ -42,22 +43,22 @@ func TestOtelComponentMappingStatusTable(t *testing.T) {
4243 {
4344 Header : []string {"Name" , "Identifier" , "Components" , "Relations" },
4445 Data : [][]interface {}{
45- {otelmapping .TestSomeOtelMappingStatusItem .Name , "identifier" , otelmapping .TestComponentCount , otelmapping .TestRelationCount },
46+ {otelmapping_test .TestSomeOtelMappingStatusItem .Name , "identifier" , otelmapping_test .TestComponentCount , otelmapping_test .TestRelationCount },
4647 },
4748 MissingTableDataMsg : printer.NotFoundMsg {Types : "otel mappings" },
4849 },
4950 {
5051 Header : []string {"Metric" , "10s ago" , "10-20s ago" , "20-30s ago" },
5152 Data : [][]interface {}{
52- {"latency seconds" , otelmapping .TestMetricValue , otelmapping .TestMetricValue , otelmapping .TestMetricValue },
53+ {"latency seconds" , otelmapping_test .TestMetricValue , otelmapping_test .TestMetricValue , otelmapping_test .TestMetricValue },
5354 },
5455 MissingTableDataMsg : printer.NotFoundMsg {Types : "metrics" },
5556 },
5657 {
5758 Header : []string {"Issue Id" , "Level" , "Message" },
5859 Data : [][]interface {}{
59- {"-" , otelmapping .TestError1 .Level , otelmapping .TestError1 .Message },
60- {"-" , otelmapping .TestError2 .Level , otelmapping .TestError2 .Message },
60+ {"-" , otelmapping_test .TestError1 .Level , otelmapping_test .TestError1 .Message },
61+ {"-" , otelmapping_test .TestError2 .Level , otelmapping_test .TestError2 .Message },
6162 },
6263 MissingTableDataMsg : printer.NotFoundMsg {Types : "otel component mapping errors" },
6364 },
0 commit comments