Skip to content

Commit

Permalink
Fix integration tests (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
medb authored and cyxxy committed Jun 12, 2019
1 parent 6510fe6 commit 3014a7b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bigtable/bigtable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function main() {
update_apt_get || err 'Unable to update packages lists.'
install_apt_get hbase || err 'Unable to install hbase.'

install_big_table_client || err 'Unable to install big table client'.
install_big_table_client || err 'Unable to install big table client.'
configure_big_table_client || err 'Failed to configure big table client.'

install_shc || err 'Failed to install Spark-HBase connector.'
Expand Down
2 changes: 1 addition & 1 deletion bigtable/test_bigtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def tearDown(self):

def _run_hbase_shell(self, name):
ret_code, stdout, stderr = self.run_command(
'gcloud compute ssh {} -- "python {}"'.format(
'gcloud compute ssh {} --command="python {}"'.format(
name,
self.TEST_SCRIPT_FILE_NAME,
)
Expand Down
2 changes: 1 addition & 1 deletion kafka/test_kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def verify_instance(self, name):

def __run_test_script(self, name):
ret_code, stdout, stderr = self.run_command(
'gcloud compute ssh {} -- "bash {}"'.format(
'gcloud compute ssh {} --command="bash {}"'.format(
name,
self.TEST_SCRIPT_FILE_NAME,
)
Expand Down
14 changes: 7 additions & 7 deletions presto/test_presto.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def verify_instance(self, name, coordinators, workers):
def __create_schema_via_hive(self, name, schema):
query = "create schema {};".format(schema)
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"hive -e '{}'\"".format(
"gcloud compute ssh {} --command=\"hive -e '{}'\"".format(
name,
query,
)
Expand All @@ -37,7 +37,7 @@ def __create_schema_via_hive(self, name, schema):
def __verify_schema_via_presto(self, name, schema):
query = "show schemas;"
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"presto --catalog=hive --execute='{}' --output-format TSV\"".format(
"gcloud compute ssh {} --command=\"presto --catalog=hive --execute='{}' --output-format TSV\"".format(
name,
query
)
Expand All @@ -49,7 +49,7 @@ def __verify_schema_via_presto(self, name, schema):
def __create_table(self, name, table, schema):
query = "create table {}(number int) STORED AS SEQUENCEFILE;".format(table)
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"hive --database {} -e '{}'\"".format(
"gcloud compute ssh {} --command=\"hive --database {} -e '{}'\"".format(
name,
schema,
query
Expand All @@ -63,7 +63,7 @@ def __insert_data_into_table_via_hive(self, name, table, schema):
",".join(["({})".format(x % 2) for x in range(400)])
)
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"hive --database {} -e '{}'\"".format(
"gcloud compute ssh {} --command=\"hive --database {} -e '{}'\"".format(
name,
schema,
query,
Expand All @@ -74,7 +74,7 @@ def __insert_data_into_table_via_hive(self, name, table, schema):
def __validate_data_in_table_via_presto(self, name, table, schema):
query = "SELECT number, count(*) AS total FROM {} GROUP BY number ORDER BY number DESC;".format(table)
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"presto --catalog=hive --schema={} --execute='{}' --output-format TSV\"".format(
"gcloud compute ssh {} --command=\"presto --catalog=hive --schema={} --execute='{}' --output-format TSV\"".format(
name,
schema,
query
Expand All @@ -86,7 +86,7 @@ def __validate_data_in_table_via_presto(self, name, table, schema):
def __verify_coordinators_count(self, name, coordinators):
query = "select count(*) from system.runtime.nodes where coordinator=true"
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"presto --execute '{}' --output-format TSV\"".format(
"gcloud compute ssh {} --command=\"presto --execute '{}' --output-format TSV\"".format(
name,
query,
)
Expand All @@ -99,7 +99,7 @@ def __verify_coordinators_count(self, name, coordinators):
def __verify_workers_count(self, name, workers):
query = "select count(*) from system.runtime.nodes where coordinator=false"
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"presto --execute '{}' --output-format TSV\"".format(
"gcloud compute ssh {} --command=\"presto --execute '{}' --output-format TSV\"".format(
name,
query,
)
Expand Down
2 changes: 1 addition & 1 deletion ranger/test_ranger.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def verify_instance(self, name):

def __run_test_script(self, name):
ret_code, stdout, stderr = self.run_command(
'gcloud compute ssh {} -- "python {}"'.format(
'gcloud compute ssh {} --command="python {}"'.format(
name,
self.TEST_SCRIPT_FILE_NAME,
)
Expand Down
2 changes: 1 addition & 1 deletion rapids/test_rapids.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def verify_instance(self, name):

def __run_test_script(self, name):
ret_code, stdout, stderr = self.run_command(
'gcloud compute ssh {} -- "/opt/conda/anaconda/envs/RAPIDS/bin/python {}"'.format(
'gcloud compute ssh {} --command="/opt/conda/anaconda/envs/RAPIDS/bin/python {}"'.format(
name,
self.TEST_SCRIPT_FILE_NAME,
)
Expand Down
14 changes: 7 additions & 7 deletions starburst-presto/test_presto.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def verify_instance(self, name, coordinators, workers):
def __create_schema_via_hive(self, name, schema):
query = "create schema {};".format(schema)
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"hive -e '{}'\"".format(
"gcloud compute ssh {} --command=\"hive -e '{}'\"".format(
name,
query,
)
Expand All @@ -37,7 +37,7 @@ def __create_schema_via_hive(self, name, schema):
def __verify_schema_via_presto(self, name, schema):
query = "show schemas;"
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"presto --catalog=hive --execute='{}' --output-format TSV\"".format(
"gcloud compute ssh {} --command=\"presto --catalog=hive --execute='{}' --output-format TSV\"".format(
name,
query
)
Expand All @@ -49,7 +49,7 @@ def __verify_schema_via_presto(self, name, schema):
def __create_table(self, name, table, schema):
query = "create table {}(number int) STORED AS SEQUENCEFILE;".format(table)
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"hive --database {} -e '{}'\"".format(
"gcloud compute ssh {} --command=\"hive --database {} -e '{}'\"".format(
name,
schema,
query
Expand All @@ -63,7 +63,7 @@ def __insert_data_into_table_via_hive(self, name, table, schema):
",".join(["({})".format(x % 2) for x in range(400)])
)
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"hive --database {} -e '{}'\"".format(
"gcloud compute ssh {} --command=\"hive --database {} -e '{}'\"".format(
name,
schema,
query,
Expand All @@ -74,7 +74,7 @@ def __insert_data_into_table_via_hive(self, name, table, schema):
def __validate_data_in_table_via_presto(self, name, table, schema):
query = "SELECT number, count(*) AS total FROM {} GROUP BY number ORDER BY number DESC;".format(table)
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"presto --catalog=hive --schema={} --execute='{}' --output-format TSV\"".format(
"gcloud compute ssh {} --command=\"presto --catalog=hive --schema={} --execute='{}' --output-format TSV\"".format(
name,
schema,
query
Expand All @@ -86,7 +86,7 @@ def __validate_data_in_table_via_presto(self, name, table, schema):
def __verify_coordinators_count(self, name, coordinators):
query = "select count(*) from system.runtime.nodes where coordinator=true"
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"presto --execute '{}' --output-format TSV\"".format(
"gcloud compute ssh {} --command=\"presto --execute '{}' --output-format TSV\"".format(
name,
query,
)
Expand All @@ -99,7 +99,7 @@ def __verify_coordinators_count(self, name, coordinators):
def __verify_workers_count(self, name, workers):
query = "select count(*) from system.runtime.nodes where coordinator=false"
ret_code, stdout, stderr = self.run_command(
"gcloud compute ssh {} -- \"presto --execute '{}' --output-format TSV\"".format(
"gcloud compute ssh {} --command=\"presto --execute '{}' --output-format TSV\"".format(
name,
query,
)
Expand Down

0 comments on commit 3014a7b

Please sign in to comment.