66 "github.com/stretchr/testify/require"
77)
88
9- const connectionString = "InstrumentationKey=00000000 -0000-0000-0000-000000000000 ;IngestionEndpoint=https://ingestion.endpoint.com/;LiveEndpoint=https://live.endpoint.com/;ApplicationId=11111111 -1111-1111-1111-111111111111 "
9+ const connectionString = "InstrumentationKey=0000 -0000-0000-0000-0000 ;IngestionEndpoint=https://ingestion.endpoint.com/;LiveEndpoint=https://live.endpoint.com/;ApplicationId=1111 -1111-1111-1111-1111 "
1010
1111func TestParseConnectionString (t * testing.T ) {
1212 tests := []struct {
@@ -19,8 +19,8 @@ func TestParseConnectionString(t *testing.T) {
1919 name : "Valid connection string and instrumentation key" ,
2020 connectionString : connectionString ,
2121 want : & connectionVars {
22- instrumentationKey : "00000000 -0000-0000-0000-000000000000 " ,
23- ingestionUrl : "https://ingestion.endpoint.com/v2.1/track" ,
22+ instrumentationKey : "0000 -0000-0000-0000-0000 " ,
23+ ingestionURL : "https://ingestion.endpoint.com/v2.1/track" ,
2424 },
2525 wantErr : false ,
2626 },
@@ -32,7 +32,7 @@ func TestParseConnectionString(t *testing.T) {
3232 },
3333 {
3434 name : "Valid instrumentation key with missing ingestion endpoint" ,
35- connectionString : "InstrumentationKey=00000000 -0000-0000-0000-000000000000 ;IngestionEndpoint=" ,
35+ connectionString : "InstrumentationKey=0000 -0000-0000-0000-0000 ;IngestionEndpoint=" ,
3636 want : nil ,
3737 wantErr : true ,
3838 },
@@ -59,7 +59,7 @@ func TestParseConnectionString(t *testing.T) {
5959 require .NoError (t , err , "Expected no error but got one" )
6060 require .NotNil (t , got , "Expected a non-nil result" )
6161 require .Equal (t , tt .want .instrumentationKey , got .instrumentationKey , "Instrumentation Key does not match" )
62- require .Equal (t , tt .want .ingestionUrl , got .ingestionUrl , "Ingestion URL does not match" )
62+ require .Equal (t , tt .want .ingestionURL , got .ingestionURL , "Ingestion URL does not match" )
6363 }
6464 })
6565 }
0 commit comments