В настоящее время я пытаюсь запустить мои тесты pact.net в Docker-контейнере, однако получаю следующую ошибку:
Starting test execution, please wait...
pact-consumer-tests | [xUnit.net 00:00:19.9436627]
pact_consumer.tests.AddConsumerTest.Add_customer [FAIL]
pact-consumer-tests | Failed
pact_consumer.tests.AddConsumerTest.Add_customer
pact-consumer-tests | Error Message:
pact-consumer-tests | System.AggregateException : One or more errors
occurred. (One or more errors occurred. (Cannot assign requested
address)) (The following constructor parameters did not have matching
fixture data: ConsumerApiPact data)
pact-consumer-tests | ---- System.AggregateException : One or more
errors occurred. (Cannot assign requested address)
pact-consumer-tests | -------- System.Net.Http.HttpRequestException :
Cannot assign requested address
pact-consumer-tests | ------------ System.Net.Sockets.SocketException
: Cannot assign requested address
pact-consumer-tests | ---- The following constructor parameters did
not have matching fixture data: ConsumerApiPact data
pact-consumer-tests | Stack Trace:
pact-consumer-tests |
pact-consumer-tests | ----- Inner Stack Trace #1
(System.AggregateException) -----
pact-consumer-tests | at
PactNet.Mocks.MockHttpService.Host.RubyHttpHost.Start() in
C:\projects\pact-
net\PactNet\Mocks\MockHttpService\Host\RubyHttpHost.cs:line 65
pact-consumer-tests | at PactNet.PactBuilder.MockService(Int32
port, JsonSerializerSettings jsonSerializerSettings, Boolean enableSsl,
IPAddress host) in C:\projects\pact-net\PactNet\PactBuilder.cs:line 82
pact-consumer-tests | at
pact_consumer.tests.context.ConsumerApiPact..ctor() in /app/pact-
consumer.tests/context/ConsumerApiPact.cs:line 27
pact-consumer-tests | ----- Inner Stack Trace -----
pact-consumer-tests | at
System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port,
CancellationToken cancellationToken)
....
Что бы я ни отправил в структуру для Host IPAddress.Any AND IpAddress.Loopback, но мне все еще кажется, что эта проблема?
Я что-то упустил? Он работает в док-контейнере, на котором не запущены другие службы ..
Я могу запустить это на OSX, используя dotnet test
, и все хорошо.
Большое спасибо заранее
Richard