github.com/kubeshop/testkube@v1.17.23/pkg/telemetry/payload_test.go (about) 1 package telemetry 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestAnonymyzeHost(t *testing.T) { 10 t.Run("testkube based hosts", func(t *testing.T) { 11 assert.Equal(t, APIHostTestkubeInternal, AnonymizeHost("dashboard.testkube.io")) 12 }) 13 t.Run("localhosts", func(t *testing.T) { 14 assert.Equal(t, APIHostLocal, AnonymizeHost("localhost:8088")) 15 }) 16 t.Run("external", func(t *testing.T) { 17 assert.Equal(t, APIHostExternal, AnonymizeHost("apis.google.com")) 18 }) 19 }