mirror of https://github.com/databricks/cli.git
add error test case'
This commit is contained in:
parent
1bb45377e0
commit
c9ebc82232
|
@ -0,0 +1 @@
|
|||
{"method":"POST","path":"/telemetry-ext","body":{"uploadTime":1738765652749,"items":[],"protoLogs":["{\"frontend_log_event_id\":\"[UUID]\",\"entry\":{\"databricks_cli_log\":{\"execution_context\":{\"cmd_exec_id\":\"[UUID]\",\"version\":\"[DEV_VERSION]\",\"command\":\"telemetry_dummy\",\"operating_system\":\"darwin\",\"execution_time_ms\":0,\"exit_code\":0},\"cli_test_event\":{\"name\":\"VALUE1\"}}}}","{\"frontend_log_event_id\":\"[UUID]\",\"entry\":{\"databricks_cli_log\":{\"execution_context\":{\"cmd_exec_id\":\"[UUID]\",\"version\":\"[DEV_VERSION]\",\"command\":\"telemetry_dummy\",\"operating_system\":\"darwin\",\"execution_time_ms\":0,\"exit_code\":0},\"cli_test_event\":{\"name\":\"VALUE2\"}}}}"]}}
|
|
@ -0,0 +1,2 @@
|
|||
error: Failed to upload telemetry logs: Endpoint not found.
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
>>> $CLI telemetry dummy
|
||||
>>> [CLI] telemetry dummy
|
||||
waiting for telemetry process to finish
|
||||
File ./telemetry.pid exists
|
||||
Process has ended
|
|
@ -0,0 +1,11 @@
|
|||
RecordRequests = true
|
||||
|
||||
[[Server]]
|
||||
Pattern = "POST /telemetry-ext"
|
||||
Response.Body = '''
|
||||
{
|
||||
"error_code": "ERROR_CODE",
|
||||
"message": "Endpoint not found."
|
||||
}
|
||||
'''
|
||||
Response.StatusCode = 404
|
|
@ -1,26 +0,0 @@
|
|||
error: Failed to upload telemetry logs: unable to parse response. This is likely a bug in the Databricks SDK for Go or the underlying REST API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:
|
||||
```
|
||||
POST /telemetry-ext
|
||||
> * Host:
|
||||
> * Accept: application/json
|
||||
> * Authorization: REDACTED
|
||||
> * Content-Type: application/json
|
||||
> * Traceparent: 00-e27f6502db1cca42797a699350f519db-1af47293f6a135c1-01
|
||||
> * User-Agent: cli/$DEV_VERSION databricks-sdk-go/0.56.1 go/1.23.4 os/darwin auth/pat
|
||||
> {
|
||||
> "items": null,
|
||||
> "protoLogs": [
|
||||
> "{\"frontend_log_event_id\":\"[UUID]\",\"entry\":{\"databricks_cli_log\":{\"execution_context\":{\"cmd_exec_id\":\"[UUID]\",\"version\":\"$DEV_VERSION\",\"command\":\"telemetry_dummy\",\"operating_system\":\"darwin\",\"execution_time_ms\":0,\"exit_code\":0},\"cli_test_event\":{\"name\":\"VALUE1\"}}}}",
|
||||
> "{\"frontend_log_event_id\":\"[UUID]\",\"entry\":{\"databricks_cli_log\":{\"execution_context\":{\"cmd_exec_id\":\"[UUID]\",\"version\":\"$DEV_VERSION\",\"command\":\"telemetry_dummy\",\"operating_system\":\"darwin\",\"execution_time_ms\":0,\"exit_code\":0},\"cli_test_event\":{\"name\":\"VALUE2\"}}}}"
|
||||
> ],
|
||||
> "uploadTime": 1738684185167
|
||||
> }
|
||||
< HTTP/1.1 404 Not Found
|
||||
< * Content-Length: 19
|
||||
< * Content-Type: text/plain; charset=utf-8
|
||||
< * Date: Tue, 04 Feb 2025 15:49:45 GMT
|
||||
< * X-Content-Type-Options: nosniff
|
||||
< 404 page not found
|
||||
<
|
||||
```
|
||||
|
|
@ -1 +1 @@
|
|||
{"method":"POST","path":"/telemetry-ext","body":{"uploadTime":"UNIX_TIME_MILLIS","items":[],"protoLogs":["{\"frontend_log_event_id\":\"[UUID]\",\"entry\":{\"databricks_cli_log\":{\"execution_context\":{\"cmd_exec_id\":\"[UUID]\",\"version\":\"$DEV_VERSION\",\"command\":\"telemetry_dummy\",\"operating_system\":\"OS\",\"execution_time_ms\":\"SMALL_INT\",\"exit_code\":0},\"cli_test_event\":{\"name\":\"VALUE1\"}}}}","{\"frontend_log_event_id\":\"[UUID]\",\"entry\":{\"databricks_cli_log\":{\"execution_context\":{\"cmd_exec_id\":\"[UUID]\",\"version\":\"$DEV_VERSION\",\"command\":\"telemetry_dummy\",\"operating_system\":\"OS\",\"execution_time_ms\":\"SMALL_INT\",\"exit_code\":0},\"cli_test_event\":{\"name\":\"VALUE2\"}}}}"]}}
|
||||
{"method":"POST","path":"/telemetry-ext","body":{"uploadTime":"UNIX_TIME_MILLIS","items":[],"protoLogs":["{\"frontend_log_event_id\":\"[UUID]\",\"entry\":{\"databricks_cli_log\":{\"execution_context\":{\"cmd_exec_id\":\"[UUID]\",\"version\":\"[DEV_VERSION]\",\"command\":\"telemetry_dummy\",\"operating_system\":\"OS\",\"execution_time_ms\":\"SMALL_INT\",\"exit_code\":0},\"cli_test_event\":{\"name\":\"VALUE1\"}}}}","{\"frontend_log_event_id\":\"[UUID]\",\"entry\":{\"databricks_cli_log\":{\"execution_context\":{\"cmd_exec_id\":\"[UUID]\",\"version\":\"[DEV_VERSION]\",\"command\":\"telemetry_dummy\",\"operating_system\":\"OS\",\"execution_time_ms\":\"SMALL_INT\",\"exit_code\":0},\"cli_test_event\":{\"name\":\"VALUE2\"}}}}"]}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
>>> $CLI telemetry dummy
|
||||
>>> [CLI] telemetry dummy
|
||||
waiting for telemetry process to finish
|
||||
File ./telemetry.pid exists
|
||||
Process has ended
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
|
||||
>>> $CLI telemetry upload
|
||||
>>> [CLI] telemetry upload
|
||||
|
|
Loading…
Reference in New Issue