Skip to content

Commit

Permalink
Update test_hue.py
Browse files Browse the repository at this point in the history
  • Loading branch information
medb committed Apr 7, 2022
1 parent 2868984 commit dff9dec
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions hue/test_hue.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import os
import pkg_resources

from absl.testing import absltest
from absl.testing import parameterized

from integration_tests.dataproc_test_case import DataprocTestCase
import os


class HueTestCase(DataprocTestCase):
COMPONENT = 'hue'
Expand All @@ -26,12 +28,11 @@ def verify_instance(self, instance_name):
self._run_hue_test_script(instance_name)

def _run_hue_test_script(self, instance_name):
name = ''
verify_cmd = "/bin/bash {}".format(
self.HUE_SCRIPT)
verify_cmd = "/bin/bash {}".format(self.HUE_SCRIPT)
self.upload_test_file(
os.path.join(os.path.dirname(os.path.abspath(__file__)),
self.HUE_SCRIPT), instance_name)
os.path.join(
os.path.dirname(os.path.abspath(__file__)), self.HUE_SCRIPT),
instance_name)
self.assert_instance_command(instance_name, verify_cmd)
self.remove_test_script(self.HUE_SCRIPT, instance_name)

Expand All @@ -41,9 +42,6 @@ def _run_hue_test_script(self, instance_name):
("HA", ["m-0"]),
)
def test_hue(self, configuration, machine_suffixes):
if self.getImageOs() == 'ubuntu':
if self.getImageVersion() <= pkg_resources.parse_version("1.4"):
self.skipTest("Not supported in pre 1.5 Ubuntu images")
self.createCluster(configuration, self.INIT_ACTIONS)
for machine_suffix in machine_suffixes:
self.verify_instance("{}-{}".format(self.getClusterName(),
Expand Down

0 comments on commit dff9dec

Please sign in to comment.