added the ability to prohibit network access for code submissions executed using Docker

This commit is contained in:
Hauke Klement
2015-03-17 17:14:25 +01:00
parent b1218e0b80
commit 15d8984a9e
12 changed files with 41 additions and 4 deletions

View File

@ -36,6 +36,10 @@ describe DockerClient, docker: true do
expect(container_creation_options).to include('Memory' => execution_environment.memory_limit.megabytes)
end
it 'specifies whether network access is enabled' do
expect(container_creation_options).to include('NetworkDisabled' => !execution_environment.network_enabled?)
end
it 'specifies to open the standard input stream once' do
expect(container_creation_options).to include('OpenStdin' => true, 'StdinOnce' => true)
end