From 0fe5e9bdcf250b4c05a22955015ad2724ddc063a Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 16 Jul 2020 15:13:15 +0300 Subject: [PATCH] Updated safety factor --- app/workers/functions.php | 2 +- tests/e2e/Services/Health/HealthCustomServerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index c744f708e..78f178488 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -128,6 +128,7 @@ class FunctionsV1 * Limit CPU Usage - DONE * Limit Memory Usage - DONE * Limit Network Usage + * Limit Storage Usage (//--storage-opt size=120m \) * Make sure no access to redis, mariadb, influxdb or other system services * Make sure no access to NFS server / storage volumes * Access Appwrite REST from internal network for improved performance @@ -155,7 +156,6 @@ class FunctionsV1 } } - //--storage-opt size=120m \ $exitCode = Console::execute("docker run \ --cpus=1 \ --memory=50m \ diff --git a/tests/e2e/Services/Health/HealthCustomServerTest.php b/tests/e2e/Services/Health/HealthCustomServerTest.php index 572ad2906..52b0437a7 100644 --- a/tests/e2e/Services/Health/HealthCustomServerTest.php +++ b/tests/e2e/Services/Health/HealthCustomServerTest.php @@ -173,7 +173,7 @@ class HealthCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertIsInt($response['body']['size']); - $this->assertLessThan(120, $response['body']['size']); + $this->assertLessThan(160, $response['body']['size']); /** * Test for FAILURE