Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Molaire committed May 31, 2023
1 parent 56b87ff commit c3060ff
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion tests/test_tron_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,15 @@ def test_format_tron_action_dict_paasta(self):
"disk": 42,
"pool": "special_pool",
"env": {"SHELL": "/bin/bash"},
"secret_volumes": [
{
"secret_volume_name": "abc",
"secret_name": "secret1",
"container_path": "/b/c",
"default_mode": "0644",
"items": [{"key": "secret1", "path": "abc"}],
}
],
"extra_volumes": [
{"containerPath": "/nail/tmp", "hostPath": "/nail/tmp", "mode": "RW"}
],
Expand Down Expand Up @@ -843,6 +852,15 @@ def test_format_tron_action_dict_paasta(self):
"mem": 1200,
"disk": 42,
"env": mock.ANY,
"secret_volumes": [
{
"secret_volume_name": "abc",
"secret_name": "secret1",
"container_path": "/b/c",
"default_mode": "0644",
"items": [{"key": "secret1", "path": "abc"}],
}
],
"extra_volumes": [
{"container_path": "/nail/tmp", "host_path": "/nail/tmp", "mode": "RW"}
],
Expand Down Expand Up @@ -1293,6 +1311,15 @@ def test_format_tron_action_dict_paasta_no_branch_dict(self):
"disk": 42,
"pool": "special_pool",
"env": {"SHELL": "/bin/bash"},
"secret_volumes": [
{
"secret_volume_name": "abc",
"secret_name": "secret1",
"container_path": "/b/c",
"default_mode": "0644",
"items": [{"key": "secret1", "path": "abc"}],
}
],
"extra_volumes": [
{"containerPath": "/nail/tmp", "hostPath": "/nail/tmp", "mode": "RW"}
],
Expand Down Expand Up @@ -1329,6 +1356,15 @@ def test_format_tron_action_dict_paasta_no_branch_dict(self):
"mem": 1200,
"disk": 42,
"env": mock.ANY,
"secret_volumes": [
{
"secret_volume_name": "abc",
"secret_name": "secret1",
"container_path": "/b/c",
"default_mode": "0644",
"items": [{"key": "secret1", "path": "abc"}],
}
],
"extra_volumes": [
{"container_path": "/nail/tmp", "host_path": "/nail/tmp", "mode": "RW"}
],
Expand Down Expand Up @@ -1475,7 +1511,7 @@ def test_create_complete_config_e2e(self, tmpdir):
# that are not static, this will cause continuous reconfiguration, which
# will add significant load to the Tron API, which happened in DAR-1461.
# but if this is intended, just change the hash.
assert hasher.hexdigest() == "f740410f7ae2794f9924121c1115e15d"
assert hasher.hexdigest() == "35972651618a848ac6bf7947245dbaea"

def test_override_default_pool_override(self, tmpdir):
soa_dir = tmpdir.mkdir("test_create_complete_config_soa")
Expand Down

0 comments on commit c3060ff

Please sign in to comment.