Skip to content

Commit

Permalink
Set defaults for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ggear committed Apr 12, 2014
1 parent 1ebe5e3 commit a441c60
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/functions/configure_cm_cdh_pre.sh
Expand Up @@ -43,7 +43,7 @@ function configure_cm_cdh_pre() {
chmod 777 "${CM_CDH_DIRS_ARRAY[0]}/mapreduce/jobtracker/history"
elif [ "$CM_CDH_ROLE" = "cm-cdh-impala" -o "$CM_CDH_ROLE" = "cm-cdh-impalastatestore" -o "$CM_CDH_ROLE" = "cm-cdh-impalacatalog" ]; then
JAVA_HOME=$(grep "export JAVA_HOME" /etc/profile | cut -d= -f 2)
REPOCDH=${REPOCDH:-cdh4}
REPOCDH=${REPOCDH:-cdh5}
CDH_MAJOR_VERSION=$(echo $REPOCDH | sed -e 's/cdh\([0-9]\).*/\1/')
if [ $CDH_MAJOR_VERSION -le 4 ]; then
if which dpkg &> /dev/null; then
Expand Down
Expand Up @@ -88,6 +88,10 @@ public abstract class BaseITServer implements BaseTest {
} catch (ConfigurationException e) {
throw new RuntimeException("Could not load test properties [" + TEST_CM_TEST_GLOBAL_PROPERTIES + "]", e);
}
setSystemProperty(TEST_CM_VERSION, CmServerSmokeSuiteIT.CM_VERSION_MATRIX[0][0], false);
setSystemProperty(TEST_CM_API_VERSION, CmServerSmokeSuiteIT.CM_VERSION_MATRIX[0][1], false);
setSystemProperty(TEST_CM_CDH_VERSION, CmServerSmokeSuiteIT.CM_VERSION_MATRIX[0][2], false);
setSystemProperty(TEST_PLATFORM, CmServerSmokeSuiteIT.OS_VERSION_MATRIX[0], false);
}

@Rule
Expand Down Expand Up @@ -286,7 +290,6 @@ public static void main(String[] args) {

protected static void setSystemProperty(String name, String value) {
setSystemProperty(name, value, true);

}

protected static void setSystemProperty(String name, String value, boolean overide) {
Expand Down
Expand Up @@ -11,9 +11,9 @@
@RunWith(Parameterized.class)
public class CmServerSmokeSuiteIT extends CmServerSmokeIT {

private static String[] OS_VERSION_MATRIX = new String[] { "centos", "ubuntu" };
private static String[][] CM_VERSION_MATRIX = new String[][] { { "cm5.0.0", "v6", "cdh4" },
{ "cm5.0.0", "v6", "cdh5" } };
public static String[] OS_VERSION_MATRIX = new String[] { "centos", "ubuntu" };
public static String[][] CM_VERSION_MATRIX = new String[][] { { "cm5.0.0", "v6", "cdh5" },
{ "cm5.0.0", "v6", "cdh4" } };

@Parameters
public static Collection<String[]> data() {
Expand Down

0 comments on commit a441c60

Please sign in to comment.