arquillian / arquillian-cube

Control (docker, kubernetes, openshift) containers in your tests with ease!
http://arquillian.org/arquillian-cube/
121 stars 98 forks source link

should_report_network_topology_of_docker_containers fails #498

Closed iocanel closed 8 years ago

iocanel commented 8 years ago

https://github.com/arquillian/arquillian-cube/blob/f8b0ac239314976bb5c84d88ff8dbc8888a823c2/docker/recorder/src/test/java/org/arquillian/cube/docker/impl/client/reporter/TakeDockerEnvironmentTest.java#L284

It seems that no behavior is defined for this test case.

lordofthejars commented 8 years ago

What you mean by no behaviour, there is some assertions that asserts that the information is correctly created.

iocanel commented 8 years ago

I mean that the mock doesn't seem to define any behavior for the inspect method, which is indirectly called (resulting in an NPE).

lordofthejars commented 8 years ago

No, we are using the object just for capturing the result inside. https://github.com/arquillian/arquillian-cube/blob/f8b0ac239314976bb5c84d88ff8dbc8888a823c2/docker/recorder/src/test/java/org/arquillian/cube/docker/impl/client/reporter/TakeDockerEnvironmentTest.java#L293

iocanel commented 8 years ago

Does the test work for you?

dipak-pawar commented 8 years ago

@iocanel test is not working. Let me check what's wrong with it.

dipak-pawar commented 8 years ago

Submitted PR for above issue. Thanks @iocanel

iocanel commented 8 years ago

You may have to use something like the @RequiresDocker annotation so that the test will not fail on environments where docker is not available (e.g. circleci).

dipak-pawar commented 8 years ago

@iocanel there is bug in test code. No need to mention @RequiresDocker annotation for this tests as we are providing networkMode from dockerContainers properties, and you will never reach this scenario.

lordofthejars commented 8 years ago

@iocanel fixed and merged :)