remove user agent from telemetry tests

This commit is contained in:
Shreyas Goenka 2025-02-21 16:48:30 +01:00
parent 5ee52acacf
commit 5056070d11
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
6 changed files with 3 additions and 10 deletions

View File

@ -1,6 +1,6 @@
LocalOnly = true
RecordRequests = true
IncludeRequestHeaders = ["Authorization", "User-Agent"]
IncludeRequestHeaders = ["Authorization"]
[[Repls]]
Old = '17\d{11}'

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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) {

View File

@ -11,6 +11,7 @@ func New() *cobra.Command {
Hidden: true,
}
// TODO: Run the acceptance tests as integration tests?
cmd.AddCommand(newSendTelemetry())
return cmd
}