github.com/kubeshop/testkube@v1.17.23/pkg/event/kind/common/name_test.go (about)

     1  package common
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestListenerName(t *testing.T) {
    10  	t.Parallel()
    11  	// given
    12  	in := "webhooks.http://localhost:8080/something/else.start-test"
    13  
    14  	// when
    15  	result := ListenerName(in)
    16  
    17  	// then
    18  	assert.Equal(t, "webhooks.httplocalhost8080somethingelse.starttest", result)
    19  
    20  }