mirror of https://github.com/databricks/cli.git
use pointers for payload
This commit is contained in:
parent
151df1c2c9
commit
ff15ced067
|
@ -43,7 +43,7 @@ func TestTelemetryLogger(t *testing.T) {
|
|||
// Log some events.
|
||||
err := telemetry.Log(ctx, telemetry.FrontendLogEntry{
|
||||
DatabricksCliLog: telemetry.DatabricksCliLog{
|
||||
CliTestEvent: events.CliTestEvent{
|
||||
CliTestEvent: &events.CliTestEvent{
|
||||
Name: events.DummyCliEnumValue1,
|
||||
},
|
||||
},
|
||||
|
@ -51,7 +51,7 @@ func TestTelemetryLogger(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
err = telemetry.Log(ctx, telemetry.FrontendLogEntry{
|
||||
DatabricksCliLog: telemetry.DatabricksCliLog{
|
||||
CliTestEvent: events.CliTestEvent{
|
||||
CliTestEvent: &events.CliTestEvent{
|
||||
Name: events.DummyCliEnumValue2,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -17,6 +17,6 @@ type FrontendLogEntry struct {
|
|||
}
|
||||
|
||||
type DatabricksCliLog struct {
|
||||
CliTestEvent events.CliTestEvent `json:"cli_test_event,omitempty"`
|
||||
BundleInitEvent events.BundleInitEvent `json:"bundle_init_event,omitempty"`
|
||||
CliTestEvent *events.CliTestEvent `json:"cli_test_event,omitempty"`
|
||||
BundleInitEvent *events.BundleInitEvent `json:"bundle_init_event,omitempty"`
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ func TestTelemetryLoggerFlushesEvents(t *testing.T) {
|
|||
|
||||
for _, v := range []events.DummyCliEnum{events.DummyCliEnumValue1, events.DummyCliEnumValue2, events.DummyCliEnumValue2, events.DummyCliEnumValue3} {
|
||||
err := Log(ctx, FrontendLogEntry{DatabricksCliLog: DatabricksCliLog{
|
||||
CliTestEvent: events.CliTestEvent{Name: v},
|
||||
CliTestEvent: &events.CliTestEvent{Name: v},
|
||||
}})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ func TestTelemetryLoggerFlushExitsOnTimeout(t *testing.T) {
|
|||
|
||||
for _, v := range []events.DummyCliEnum{events.DummyCliEnumValue1, events.DummyCliEnumValue2, events.DummyCliEnumValue2, events.DummyCliEnumValue3} {
|
||||
err := Log(ctx, FrontendLogEntry{DatabricksCliLog: DatabricksCliLog{
|
||||
CliTestEvent: events.CliTestEvent{Name: v},
|
||||
CliTestEvent: &events.CliTestEvent{Name: v},
|
||||
}})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue