dgroup / docker-unittests

Testing of base docker images during CI/CD process
MIT License
35 stars 4 forks source link

#217 "Testing failed" was printed twice to the STDOUT in case if testing failed #220

Closed bodax closed 5 years ago

bodax commented 5 years ago

217

codecov[bot] commented 5 years ago

Codecov Report

Merging #220 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #220   +/-   ##
=========================================
  Coverage     77.64%   77.64%           
  Complexity      397      397           
=========================================
  Files           115      115           
  Lines          1333     1333           
  Branches         60       60           
=========================================
  Hits           1035     1035           
  Misses          259      259           
  Partials         39       39
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/com/github/dgroup/dockertest/App.java 39.21% <0%> (ø) 2 <0> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 80078ca...28a203c. Read the comment docs.

dgroup commented 5 years ago

@bodax , also

The unit test is required in order to check the number of lines which were printed to std output. The com.github.dgroup.dockertest.AppTest#run can be used as skeleton

https://github.com/dgroup/docker-unittests/issues/217#issuecomment-452762971

bodax commented 5 years ago

@dgroup what's the main idea of skeleton? There a lot of bit information about it.

dgroup commented 5 years ago

@bodax , let's try to understand why this issue happens:

  1. We did some code changes
  2. We wrote some unit tests to test these changes
  3. The tests from step 2 don't cover/check the output of application in full volume. As the result, we got duplicated message.

We already have a test which is testing the application output - com.github.dgroup.dockertest.AppTest#run, however, it checks a successful scenario. We need to add a new test which will be checking the failed scenario and will verify that