spec/ruby/library/socket/socket/bind_spec.rb: allow to run under docker
A root user runs the spec without Errno::EACCES git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7453cdba1b
commit
2914522ffc
@ -112,10 +112,12 @@ describe 'Socket#bind' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
platform_is_not :windows do
|
platform_is_not :windows do
|
||||||
|
as_user do
|
||||||
it 'raises Errno::EACCES when the user is not allowed to bind to the port' do
|
it 'raises Errno::EACCES when the user is not allowed to bind to the port' do
|
||||||
sockaddr1 = Socket.pack_sockaddr_in(1, ip_address)
|
sockaddr1 = Socket.pack_sockaddr_in(1, ip_address)
|
||||||
|
|
||||||
lambda { @socket.bind(sockaddr1); }.should raise_error(Errno::EACCES)
|
lambda { @socket.bind(sockaddr1) }.should raise_error(Errno::EACCES)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user