Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions acceptance/cmd/lakebox/config/idle-timeout-bounds/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Error: idle-timeout must be 0 (clear) or between 1m and 24h, got 30s

Exit code: 1
Error: idle-timeout must be 0 (clear) or between 1m and 24h, got 48h

Exit code: 1
6 changes: 6 additions & 0 deletions acceptance/cmd/lakebox/config/idle-timeout-bounds/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Below the 60s lower bound — client-side validation rejects before
# any API call, so no [[Server]] stub needed.
errcode $CLI lakebox config happy-panda-1234 --idle-timeout 30s

# Above the 24h upper bound.
errcode $CLI lakebox config happy-panda-1234 --idle-timeout 48h
3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/config/no-flags/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/config/no-flags/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: nothing to update — pass --name, --idle-timeout, and/or --no-autostop

Exit code: 1
1 change: 1 addition & 0 deletions acceptance/cmd/lakebox/config/no-flags/script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
errcode $CLI lakebox config happy-panda-1234
3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/list/empty/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/cmd/lakebox/list/empty/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No lakeboxes found.
1 change: 1 addition & 0 deletions acceptance/cmd/lakebox/list/empty/script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$CLI lakebox list
3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/list/empty/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[Server]]
Pattern = "GET /api/2.0/lakebox/sandboxes"
Response.Body = '{"sandboxes": []}'
3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/list/with-entries/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions acceptance/cmd/lakebox/list/with-entries/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

ID NAME STATUS AUTOSTOP DEFAULT
───────────────────────────────────────────────────────────────────
happy-panda-1234 my-project running 15m
sad-otter-5678 - stopped 10m
creating-newt-9999 - creating… never

1 change: 1 addition & 0 deletions acceptance/cmd/lakebox/list/with-entries/script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$CLI lakebox list
29 changes: 29 additions & 0 deletions acceptance/cmd/lakebox/list/with-entries/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[[Server]]
Pattern = "GET /api/2.0/lakebox/sandboxes"
Response.Body = '''
{
"sandboxes": [
{
"sandboxId": "happy-panda-1234",
"status": "Running",
"name": "my-project",
"gatewayHost": "uw2.dbrx.dev",
"idleTimeout": "900s"
},
{
"sandboxId": "sad-otter-5678",
"status": "Stopped",
"name": "sad-otter-5678",
"gatewayHost": "uw2.dbrx.dev",
"idleTimeout": "600s"
},
{
"sandboxId": "creating-newt-9999",
"status": "Creating",
"name": "",
"gatewayHost": "uw2.dbrx.dev",
"noAutostop": true
}
]
}
'''
3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/ssh-key/list/empty/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/cmd/lakebox/ssh-key/list/empty/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No SSH keys registered. Run 'databricks lakebox register' to add one.
1 change: 1 addition & 0 deletions acceptance/cmd/lakebox/ssh-key/list/empty/script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$CLI lakebox ssh-key list
3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/ssh-key/list/empty/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[Server]]
Pattern = "GET /api/2.0/lakebox/ssh-keys"
Response.Body = '{"sshKeys": []}'
3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/status/not-found/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions acceptance/cmd/lakebox/status/not-found/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: no lakebox named "no-such-box" — `databricks lakebox list` shows available IDs

Exit code: 1
1 change: 1 addition & 0 deletions acceptance/cmd/lakebox/status/not-found/script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
errcode $CLI lakebox status no-such-box
4 changes: 4 additions & 0 deletions acceptance/cmd/lakebox/status/not-found/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[Server]]
Pattern = "GET /api/2.0/lakebox/sandboxes/no-such-box"
Response.StatusCode = 404
Response.Body = '{"error_code": "NOT_FOUND", "message": "Sandbox not found"}'
4 changes: 4 additions & 0 deletions acceptance/cmd/lakebox/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Acceptance tests for `databricks lakebox` subcommands. Common across
# all leaves: ignore the local state file the CLI writes (lakebox.json)
# so it doesn't bleed into the test directory's diff.
Ignore = [".databricks"]
Loading