diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-03-29 14:10:20 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-04-08 20:19:30 +0200 |
| commit | 1fb04ae372f96b32f9996c43fd066c98405ba634 (patch) | |
| tree | c683c69f04de8c31331669d1e27bf3ec60cc25b5 /simulator/opendc-serverless/opendc-serverless-service/src/test | |
| parent | b8ae32eb9a2420fe596ac5f89d3eabee83c2291a (diff) | |
serverless: Add possibility to specify function memory requirements
Diffstat (limited to 'simulator/opendc-serverless/opendc-serverless-service/src/test')
| -rw-r--r-- | simulator/opendc-serverless/opendc-serverless-service/src/test/kotlin/org/opendc/serverless/service/ServerlessServiceTest.kt | 20 |
1 files changed, 10 insertions, 10 deletions
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<IllegalStateException> { client.queryFunctions() } - assertThrows<IllegalStateException> { client.newFunction("test") } + assertThrows<IllegalStateException> { client.newFunction("test", 128) } assertThrows<IllegalStateException> { client.invoke("test") } assertThrows<IllegalStateException> { client.findFunction(UUID.randomUUID()) } assertThrows<IllegalStateException> { 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<ServerlessFunction>(), 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<ServerlessFunction>(), 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<ServerlessFunction>(), 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<IllegalArgumentException> { client.newFunction("test") } + assertThrows<IllegalArgumentException> { 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() } |
