sonatype-nexus-community / nexus-repository-helm

At the Helm, Helm Yeah, v k8s
Eclipse Public License 1.0
97 stars 71 forks source link

Test fails when run after other tests #138

Closed OrDTesters closed 4 years ago

OrDTesters commented 4 years ago

Currently, test IndexYamlBuilderTest.testChartIndexPassedCorrectly fails when run after tests HelmRecipeTest.haEnabledProxyRepository and CreateIndexServiceImplTest.testIndexYamlBuiltEvenWhenNoAssets. I can make the test fail by running:

mvn test -Dtest=HelmRecipeTest#haEnabledProxyRepository,CreateIndexServiceImplTest#testIndexYamlBuiltEvenWhenNoAssets,IndexYamlBuilderTest#testChartIndexPassedCorrectly

in the nexus-repository-helm module. The test fails with the following exception:

[ERROR] testChartIndexPassedCorrectly(org.sonatype.repository.helm.internal.orient.metadata.IndexYamlBuilderTest)  Time elapsed: 0.173 s  <<< FAILURE!
org.mockito.exceptions.verification.WantedButNotInvoked:

Wanted but not invoked:
yamlParser.write(
    <any>,
    <Capturing argument>
);
-> at org.sonatype.repository.helm.internal.orient.metadata.IndexYamlBuilderTest.testChartIndexPassedCorrectly(IndexYamlBuilderTest.java:66)
Actually, there were zero interactions with this mock.

        at org.sonatype.repository.helm.internal.orient.metadata.IndexYamlBuilderTest.testChartIndexPassedCorrectly(IndexYamlBuilderTest.java:66)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   IndexYamlBuilderTest.testChartIndexPassedCorrectly:66
Wanted but not invoked:
yamlParser.write(
    <any>,
    <Capturing argument>
);
-> at org.sonatype.repository.helm.internal.orient.metadata.IndexYamlBuilderTest.testChartIndexPassedCorrectly(IndexYamlBuilderTest.java:66)
Actually, there were zero interactions with this mock.