mirror of https://github.com/databricks/cli.git
add integration test
This commit is contained in:
parent
9e3aa59293
commit
00ebbb9c47
|
@ -1,5 +1,3 @@
|
||||||
LocalOnly = true
|
|
||||||
RecordRequests = true
|
|
||||||
IncludeRequestHeaders = ["Authorization"]
|
IncludeRequestHeaders = ["Authorization"]
|
||||||
|
|
||||||
[[Repls]]
|
[[Repls]]
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Telemetry logs uploaded successfully
|
Telemetry logs uploaded successfully
|
||||||
Response:
|
Response:
|
||||||
{"errors":null,"numProtoSuccess":2}
|
{"errors":[],"numProtoSuccess":2}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
|
LocalOnly = true
|
||||||
|
RecordRequests = true
|
||||||
|
|
||||||
[[Server]]
|
[[Server]]
|
||||||
Pattern = "POST /telemetry-ext"
|
Pattern = "POST /telemetry-ext"
|
||||||
Response.Body = '''
|
Response.Body = '''
|
||||||
{
|
{
|
||||||
|
"errors": [],
|
||||||
"numProtoSuccess": 2
|
"numProtoSuccess": 2
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
LocalOnly = true
|
||||||
|
RecordRequests = true
|
||||||
|
|
||||||
[[Server]]
|
[[Server]]
|
||||||
Pattern = "POST /telemetry-ext"
|
Pattern = "POST /telemetry-ext"
|
||||||
Response.Body = '''
|
Response.Body = '''
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
|
LocalOnly = true
|
||||||
|
RecordRequests = true
|
||||||
|
|
||||||
[[Server]]
|
[[Server]]
|
||||||
Pattern = "POST /telemetry-ext"
|
Pattern = "POST /telemetry-ext"
|
||||||
Response.Body = '''
|
Response.Body = '''
|
||||||
{
|
{
|
||||||
|
"errors": [],
|
||||||
"numProtoSuccess": 2
|
"numProtoSuccess": 2
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Telemetry logs uploaded successfully
|
||||||
|
Response:
|
||||||
|
{"errors":[],"numProtoSuccess":2}
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
>>> [CLI] selftest send-telemetry
|
||||||
|
waiting for telemetry process to finish
|
||||||
|
hello
|
||||||
|
[wait_pid] process has ended
|
|
@ -0,0 +1,14 @@
|
||||||
|
export DATABRICKS_CLI_TELEMETRY_PID_FILE=./telemetry.pid
|
||||||
|
export DATABRICKS_CLI_TELEMETRY_UPLOAD_LOGS_FILE=./out.upload_process.txt
|
||||||
|
|
||||||
|
trace $CLI selftest send-telemetry
|
||||||
|
|
||||||
|
echo "waiting for telemetry process to finish"
|
||||||
|
|
||||||
|
echo "hello"
|
||||||
|
|
||||||
|
# Wait for the child telemetry process to finish
|
||||||
|
wait_pid $(cat ./telemetry.pid)
|
||||||
|
|
||||||
|
# cleanup the pid file
|
||||||
|
rm -f ./telemetry.pid
|
|
@ -0,0 +1,16 @@
|
||||||
|
# RecordRequests is not supported for integration tests yet. Once we have support
|
||||||
|
# for running integration tests with record requests we can remove this test since
|
||||||
|
# it's a copy of acceptance/telemetry/upload-succeeds.
|
||||||
|
|
||||||
|
[[Server]]
|
||||||
|
Pattern = "POST /telemetry-ext"
|
||||||
|
Response.Body = '''
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"numProtoSuccess": 2
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
[[Repls]]
|
||||||
|
Old = 'execution_time_ms\\\":\d{1,5},'
|
||||||
|
New = 'execution_time_ms\":\"SMALL_INT\",'
|
|
@ -1,3 +1,3 @@
|
||||||
Telemetry logs uploaded successfully
|
Telemetry logs uploaded successfully
|
||||||
Response:
|
Response:
|
||||||
{"errors":null,"numProtoSuccess":2}
|
{"errors":[],"numProtoSuccess":2}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
|
LocalOnly = true
|
||||||
|
RecordRequests = true
|
||||||
|
|
||||||
[[Server]]
|
[[Server]]
|
||||||
Pattern = "POST /telemetry-ext"
|
Pattern = "POST /telemetry-ext"
|
||||||
Response.Body = '''
|
Response.Body = '''
|
||||||
{
|
{
|
||||||
|
"errors": [],
|
||||||
"numProtoSuccess": 2
|
"numProtoSuccess": 2
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Telemetry logs uploaded successfully
|
Telemetry logs uploaded successfully
|
||||||
Response:
|
Response:
|
||||||
{"errors":null,"numProtoSuccess":2}
|
{"errors":[],"numProtoSuccess":2}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
|
LocalOnly = true
|
||||||
|
RecordRequests = true
|
||||||
|
|
||||||
[[Server]]
|
[[Server]]
|
||||||
Pattern = "POST /telemetry-ext"
|
Pattern = "POST /telemetry-ext"
|
||||||
Response.Body = '''
|
Response.Body = '''
|
||||||
{
|
{
|
||||||
|
"errors": [],
|
||||||
"numProtoSuccess": 2
|
"numProtoSuccess": 2
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
|
LocalOnly = true
|
||||||
|
RecordRequests = true
|
||||||
|
|
||||||
[[Server]]
|
[[Server]]
|
||||||
Pattern = "POST /telemetry-ext"
|
Pattern = "POST /telemetry-ext"
|
||||||
Response.Body = '''
|
Response.Body = '''
|
||||||
{
|
{
|
||||||
|
"errors": [],
|
||||||
"numProtoSuccess": 2
|
"numProtoSuccess": 2
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue