mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 10:26:29 +02:00
- 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>
26 lines
459 B
Go
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))
|
|
})
|
|
}
|
|
}
|