pomerium/internal/telemetry/util_test.go
2020-05-29 15:16:22 -04:00

27 lines
460 B
Go

package telemetry
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_ServiceName(t *testing.T) {
t.Parallel()
tests := []struct {
name string
servicesOpt string
want string
}{
{"all", "all", "pomerium"},
{"proxy", "proxy", "pomerium-proxy"},
{"missing", "", "pomerium"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert.Equal(t, tt.want, ServiceName(tt.servicesOpt))
})
}
}