def test_go_runtime_returns_additional_options(self, runtime): expected = {"security_opt": ["seccomp:unconfined"], "cap_add": ["SYS_PTRACE"]} debug_options = DebugContext(debug_port=1235) result = LambdaContainer._get_additional_options(runtime, debug_options) self.assertEquals(result, expected)
def test_default_value_returned_for_non_go_runtimes(self, runtime): debug_options = DebugContext(debug_ports=[1235]) result = LambdaContainer._get_additional_options( runtime, debug_options) self.assertEqual(result, {})
def test_no_additional_options_when_debug_options_is_none(self): debug_options = DebugContext(debug_ports=None) result = LambdaContainer._get_additional_options( "runtime", debug_options) self.assertIsNone(result)
def test_default_value_returned_for_non_go_runtimes(self, runtime): debug_options = DebugContext(debug_port=1235) result = LambdaContainer._get_additional_options(runtime, debug_options) self.assertEquals(result, {})
def test_no_additional_options_when_debug_options_is_none(self): debug_options = DebugContext(debug_port=None) result = LambdaContainer._get_additional_options('runtime', debug_options) self.assertIsNone(result)