diff --git a/acceptance/telemetry/test.toml b/acceptance/telemetry/test.toml index 40a8b104d..72458baa9 100644 --- a/acceptance/telemetry/test.toml +++ b/acceptance/telemetry/test.toml @@ -1,6 +1,6 @@ LocalOnly = true RecordRequests = true -IncludeRequestHeaders = ["Authorization", "User-Agent"] +IncludeRequestHeaders = ["Authorization"] [[Repls]] Old = '17\d{11}' diff --git a/acceptance/telemetry/upload-command/out.requests.txt b/acceptance/telemetry/upload-command/out.requests.txt index 3cbc17bd8..22bf5fcaf 100644 --- a/acceptance/telemetry/upload-command/out.requests.txt +++ b/acceptance/telemetry/upload-command/out.requests.txt @@ -2,9 +2,6 @@ "headers": { "Authorization": [ "Bearer [DATABRICKS_TOKEN]" - ], - "User-Agent": [ - "cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS auth/pat" ] }, "method": "POST", diff --git a/acceptance/telemetry/upload-fails/out.requests.txt b/acceptance/telemetry/upload-fails/out.requests.txt index 9ac7e6245..76cc91ea3 100644 --- a/acceptance/telemetry/upload-fails/out.requests.txt +++ b/acceptance/telemetry/upload-fails/out.requests.txt @@ -2,9 +2,6 @@ "headers": { "Authorization": [ "Bearer [DATABRICKS_TOKEN]" - ], - "User-Agent": [ - "cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS auth/pat" ] }, "method": "POST", diff --git a/acceptance/telemetry/upload-succeeds/out.requests.txt b/acceptance/telemetry/upload-succeeds/out.requests.txt index 9ac7e6245..76cc91ea3 100644 --- a/acceptance/telemetry/upload-succeeds/out.requests.txt +++ b/acceptance/telemetry/upload-succeeds/out.requests.txt @@ -2,9 +2,6 @@ "headers": { "Authorization": [ "Bearer [DATABRICKS_TOKEN]" - ], - "User-Agent": [ - "cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS auth/pat" ] }, "method": "POST", diff --git a/cmd/root/root.go b/cmd/root/root.go index 72ad3c8dc..8f963f381 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -175,6 +175,7 @@ func inheritEnvVars() []string { return out } +// TODO: Add tests validating the auth resolution in the telemetry worker. func uploadTelemetry(ctx context.Context, cmdStr string, start, end time.Time, exitCode int) { // Nothing to upload. if !telemetry.HasLogs(ctx) { diff --git a/cmd/selftest/selftest.go b/cmd/selftest/selftest.go index 64cc562d5..902ac04a1 100644 --- a/cmd/selftest/selftest.go +++ b/cmd/selftest/selftest.go @@ -11,6 +11,7 @@ func New() *cobra.Command { Hidden: true, } + // TODO: Run the acceptance tests as integration tests? cmd.AddCommand(newSendTelemetry()) return cmd }