Skip to content

Commit 1d540e6

Browse files
committed
Merge pull request #613 from estolfo/jenkins
Remove socket mock
2 parents 355efcb + 2692146 commit 1d540e6

File tree

4 files changed

+0
-30
lines changed

4 files changed

+0
-30
lines changed

spec/mongo/address/ipv6_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
describe Mongo::Address::IPv6 do
44

5-
before do
6-
allow(::Socket).to receive(:getaddrinfo).at_most(2).times.
7-
and_return([[nil,nil,nil,nil,::Socket::AF_INET6]])
8-
end
9-
105
let(:resolver) do
116
described_class.new(*described_class.parse(address))
127
end

spec/mongo/address/unix_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
describe Mongo::Address::Unix do
44

5-
before do
6-
allow(::Socket).to receive(:getaddrinfo).at_most(2).times.
7-
and_return([[nil,nil,nil,nil,::Socket::PF_UNIX]])
8-
end
9-
105
let(:resolver) do
116
described_class.new(*described_class.parse(address))
127
end

spec/mongo/address_spec.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@
6262

6363
context 'when the addresses are identical unix sockets' do
6464

65-
before do
66-
allow(::Socket).to receive(:getaddrinfo).twice.
67-
and_return([[nil,nil,nil,nil,::Socket::PF_UNIX]])
68-
end
69-
7065
let(:address) do
7166
described_class.new('/path/to/socket.sock')
7267
end
@@ -129,11 +124,6 @@
129124

130125
context 'when providing an ipv6 host' do
131126

132-
before do
133-
allow(::Socket).to receive(:getaddrinfo).once.
134-
and_return([[nil,nil,nil,nil,::Socket::AF_INET6]])
135-
end
136-
137127
context 'when a port is provided' do
138128

139129
let(:address) do
@@ -200,11 +190,6 @@
200190

201191
context 'when providing a socket path' do
202192

203-
before do
204-
allow(::Socket).to receive(:getaddrinfo).once.
205-
and_return([[nil,nil,nil,nil,::Socket::PF_UNIX]])
206-
end
207-
208193
let(:address) do
209194
described_class.new('/path/to/socket.sock')
210195
end

spec/mongo/server_selection_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010

1111
context(spec.description) do
1212

13-
before do
14-
allow(::Socket).to receive(:getaddrinfo).at_most(5).times.
15-
and_return([[nil,nil,nil,nil,::Socket::AF_INET]])
16-
end
17-
1813
let(:topology) do
1914
spec.type.new({})
2015
end

0 commit comments

Comments
 (0)