Skip to content

Commit

Permalink
Fix failing tests on build. (#5291)
Browse files Browse the repository at this point in the history
After update lib jackson-core from version 2.5.0 to 2.7.0 some tests
fails on build. Our yaml parser uses inside jackson.databind library and this library has the same version property like jackson-core, so
this lib was updated from 2.5.0 to 2.7.0 too. In newer version library changed behavior for parser and tests fails.

Signed-off-by: Aleksandr Andrienko <aandrienko@codenvy.com>
  • Loading branch information
AndrienkoAleksandr committed Jun 8, 2017
1 parent 6a4e383 commit 5170360
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Expand Up @@ -69,8 +69,7 @@ public void composeServiceCommandShouldBeParsedSuccessfully(String command,
assertEquals(environment.get("MYSQL_PASSWORD"), "password");
assertTrue(service.getExpose().containsAll(asList("4403", "5502")));

assertTrue(service.getCommand().containsAll(commandWords));
assertEquals(service.getCommand().size(), commandNumberOfWords);
assertEquals(service.getCommand(), commandWords);
}

@DataProvider(name = "validCommand")
Expand Down Expand Up @@ -137,7 +136,7 @@ private Object[][] validCommand() {
{"\"echo ${PWD}\"", asList("echo", "${PWD}"), 2},
{"\"(Test)\"", singletonList("(Test)"), 1},

{"", singletonList(""), 1},
{"", null, 1},
};
}

Expand Down
Expand Up @@ -13,11 +13,9 @@
import com.google.common.collect.ImmutableMap;

import org.eclipse.che.api.core.ServerException;
import org.eclipse.che.api.machine.server.util.RecipeDownloader;
import org.eclipse.che.plugin.docker.compose.ComposeEnvironment;
import org.eclipse.che.plugin.docker.compose.ComposeServiceImpl;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.testng.MockitoTestNGListener;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Listeners;
Expand All @@ -40,9 +38,6 @@
@Listeners(MockitoTestNGListener.class)
public class EnvironmentDeserializerTest {

@Mock
private RecipeDownloader recipeDownloader;

@InjectMocks
private ComposeEnvironmentParser parser;

Expand Down Expand Up @@ -74,7 +69,7 @@ public Object[][] correctContentTestData() {
+ " image: codenvy/ubuntu_jdk8\n"
+ " environment:\n"
+ " MYSQL_ROOT_PASSWORD: ",
ImmutableMap.of("MYSQL_ROOT_PASSWORD", "")
ImmutableMap.of("MYSQL_ROOT_PASSWORD", null)
},

// dictionary format, value of variable contains colon sign
Expand Down

0 comments on commit 5170360

Please sign in to comment.