...

Source file src/github.com/launchdarkly/go-server-sdk/v6/ldcomponents/test_helpers_test.go

Documentation: github.com/launchdarkly/go-server-sdk/v6/ldcomponents

     1  package ldcomponents
     2  
     3  import (
     4  	"github.com/launchdarkly/go-server-sdk/v6/internal"
     5  	"github.com/launchdarkly/go-server-sdk/v6/internal/sharedtest"
     6  	"github.com/launchdarkly/go-server-sdk/v6/subsystems"
     7  )
     8  
     9  const testSdkKey = "test-sdk-key"
    10  
    11  func basicClientContext() subsystems.ClientContext {
    12  	return sharedtest.NewSimpleTestContext(testSdkKey)
    13  }
    14  
    15  // Returns a basic context where all of the service endpoints point to the specified URI.
    16  func makeTestContextWithBaseURIs(uri string) *internal.ClientContextImpl {
    17  	return &internal.ClientContextImpl{
    18  		BasicClientContext: subsystems.BasicClientContext{
    19  			SDKKey:           testSdkKey,
    20  			Logging:          sharedtest.TestLoggingConfig(),
    21  			ServiceEndpoints: RelayProxyEndpoints(uri),
    22  		},
    23  	}
    24  }
    25  

View as plain text