pomerium/internal/telemetry/util_test.go
bobby f837c92741
dev: update linter (#1728)
- gofumpt everything
- fix TLS MinVersion to be at least 1.2
- add octal syntax
- remove newlines
- fix potential decompression bomb in ecjson
- remove implicit memory aliasing in for loops.

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
2020-12-30 09:02:57 -08:00

26 lines
459 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))
})
}
}