Fail the tests that skipped at run time, naming what they miss, and give CI's tests docker
This commit is contained in:
@@ -94,8 +94,7 @@ class RunHeavy(unittest.TestCase):
|
||||
|
||||
def test_a_docker_run_without_limits_gets_three_quarters_of_the_memory_split_across_the_slots(self):
|
||||
memory = read_memory()
|
||||
if memory is None:
|
||||
self.skipTest("no /proc/meminfo to read the share from")
|
||||
assert memory is not None, "this test reads the share from /proc/meminfo, which only Linux has"
|
||||
share = f"{memory.total * 3 // 4 // slot_count(usable_cpus()) // 1024}m"
|
||||
result = self.run_tool("docker", "run", "--rm", "img", "true", env=self.fake_docker())
|
||||
self.assertEqual((result.returncode, result.stdout), (0, f"run --memory {share} --memory-swap {share} --rm img true\n"))
|
||||
|
||||
Reference in New Issue
Block a user