Skip to content

Commit 2ddaed2

Browse files
committed
fix unit test
1 parent 0dbeae3 commit 2ddaed2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

sky/server/requests/requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def create_table(cursor, conn):
497497
db_utils.add_column_to_table(cursor, conn, REQUEST_TABLE, COL_FINISHED_AT,
498498
'REAL')
499499

500-
# Add an index on status to speed up queries that filter on this column.
500+
# Add an index on (status, name) to speed up queries that filter on these columns.
501501
cursor.execute(f"""\
502502
CREATE INDEX IF NOT EXISTS status_name_idx ON {REQUEST_TABLE} (status, name) WHERE status IN ('PENDING', 'RUNNING');
503503
""")

tests/unit_tests/test_sky/utils/test_command_runner.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
"""Unit tests for sky.utils.command_runner."""
22

3+
from sky import authentication
34
from sky.utils import command_runner
5+
from sky.utils import common_utils
46

57

68
def test_docker_runner_passes_proxy_command_to_inner_hop() -> None:
79
"""Ensure docker-mode runners reuse user proxy for the host hop."""
810
proxy_cmd = 'ssh -W %h:%p jump@host'
11+
user_hash = common_utils.get_user_hash()
12+
private_key_path, _, _ = authentication.get_ssh_key_and_lock_path(user_hash)
13+
914
runner = command_runner.SSHCommandRunner(
1015
node=('10.0.0.5', 22),
1116
ssh_user='ubuntu',
12-
ssh_private_key='/tmp/fake-key',
17+
ssh_private_key=private_key_path,
1318
ssh_proxy_command=proxy_cmd,
1419
docker_user='container',
1520
ssh_control_name='unit-test-control',

0 commit comments

Comments
 (0)