MCPcopy Create free account
hub / github.com/apache/pulsar-client-go / TestHTTPTokenAuthFromFile

Function TestHTTPTokenAuthFromFile

pulsar/client_impl_test.go:902–917  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

900}
901
902func TestHTTPTokenAuthFromFile(t *testing.T) {
903 client, err := NewClient(ClientOptions{
904 URL: serviceURL,
905 Authentication: NewAuthenticationTokenFromFile(tokenFilePath),
906 })
907 assert.NoError(t, err)
908
909 producer, err := client.CreateProducer(ProducerOptions{
910 Topic: newAuthTopicName(),
911 })
912
913 assert.NoError(t, err)
914 assert.NotNil(t, producer)
915
916 client.Close()
917}
918
919func TestHTTPSTokenAuthFromFile(t *testing.T) {
920 client, err := NewClient(ClientOptions{

Callers

nothing calls this directly

Calls 5

CreateProducerMethod · 0.95
CloseMethod · 0.95
newAuthTopicNameFunction · 0.85
NewClientFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…