From 1fb04ae372f96b32f9996c43fd066c98405ba634 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 29 Mar 2021 14:10:20 +0200 Subject: serverless: Add possibility to specify function memory requirements --- .../serverless/service/ServerlessServiceTest.kt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'simulator/opendc-serverless/opendc-serverless-service/src/test') diff --git a/simulator/opendc-serverless/opendc-serverless-service/src/test/kotlin/org/opendc/serverless/service/ServerlessServiceTest.kt b/simulator/opendc-serverless/opendc-serverless-service/src/test/kotlin/org/opendc/serverless/service/ServerlessServiceTest.kt index c4910758..569e9246 100644 --- a/simulator/opendc-serverless/opendc-serverless-service/src/test/kotlin/org/opendc/serverless/service/ServerlessServiceTest.kt +++ b/simulator/opendc-serverless/opendc-serverless-service/src/test/kotlin/org/opendc/serverless/service/ServerlessServiceTest.kt @@ -53,7 +53,7 @@ internal class ServerlessServiceTest { assertDoesNotThrow { client.close() } assertThrows { client.queryFunctions() } - assertThrows { client.newFunction("test") } + assertThrows { client.newFunction("test", 128) } assertThrows { client.invoke("test") } assertThrows { client.findFunction(UUID.randomUUID()) } assertThrows { client.findFunction("name") } @@ -78,7 +78,7 @@ internal class ServerlessServiceTest { val client = service.newClient() - val function = client.newFunction("test") + val function = client.newFunction("test", 128) assertEquals("test", function.name) } @@ -93,7 +93,7 @@ internal class ServerlessServiceTest { assertEquals(emptyList(), client.queryFunctions()) - val function = client.newFunction("test") + val function = client.newFunction("test", 128) assertEquals(listOf(function), client.queryFunctions()) } @@ -108,7 +108,7 @@ internal class ServerlessServiceTest { assertEquals(emptyList(), client.queryFunctions()) - val function = client.newFunction("test") + val function = client.newFunction("test", 128) assertNotNull(client.findFunction(function.uid)) } @@ -123,7 +123,7 @@ internal class ServerlessServiceTest { assertEquals(emptyList(), client.queryFunctions()) - val function = client.newFunction("test") + val function = client.newFunction("test", 128) assertNotNull(client.findFunction(function.name)) } @@ -136,9 +136,9 @@ internal class ServerlessServiceTest { val client = service.newClient() - client.newFunction("test") + client.newFunction("test", 128) - assertThrows { client.newFunction("test") } + assertThrows { client.newFunction("test", 128) } } @Test @@ -148,7 +148,7 @@ internal class ServerlessServiceTest { val service = ServerlessService(coroutineContext, clock, meter, mockk(), mockk()) val client = service.newClient() - val function = client.newFunction("test") + val function = client.newFunction("test", 128) assertNotNull(client.findFunction(function.uid)) function.delete() assertNull(client.findFunction(function.uid)) @@ -164,7 +164,7 @@ internal class ServerlessServiceTest { val service = ServerlessService(coroutineContext, clock, meter, mockk(), mockk()) val client = service.newClient() - val function = client.newFunction("test") + val function = client.newFunction("test", 128) assertNotNull(client.findFunction(function.uid)) function.delete() @@ -190,7 +190,7 @@ internal class ServerlessServiceTest { } val client = service.newClient() - val function = client.newFunction("test") + val function = client.newFunction("test", 128) function.invoke() } -- cgit v1.2.3