def test_start_smoketests_presto(
            self, execute_mock, unused_configure_mock, smoketest_presto_mock, create_connectors_mock):
        presto_coordinator = Coordinator()

        presto_coordinator.start(self.mock_env)

        assert smoketest_presto_mock.called
示例#2
0
    def test_lifecycle_methods_shell_out_to_execute(self, execute_mock,
                                                    unused_configure_mock,
                                                    unused_smoketest_presto):
        presto_coordinator = Coordinator()

        presto_coordinator.install(self.mock_env)
        assert execute_mock.call_count is 2
        assert 'wget' in execute_mock.call_args_list[0][0][0]
        assert 'rpm -i' in execute_mock.call_args_list[1][0][0]
        assert 'export JAVA8_HOME=' in execute_mock.call_args_list[1][0][0]
        execute_mock.reset_mock()

        presto_coordinator.stop(self.mock_env)
        assert execute_mock.call_count is 1
        assert 'stop' in execute_mock.call_args_list[0][0][0]
        execute_mock.reset_mock()

        presto_coordinator.start(self.mock_env)
        assert execute_mock.call_count is 1
        assert 'start' in execute_mock.call_args_list[0][0][0]
        execute_mock.reset_mock()

        presto_coordinator.status(self.mock_env)
        assert execute_mock.call_count is 1
        assert 'status' in execute_mock.call_args_list[0][0][0]
示例#3
0
    def test_start_smoketests_presto(
            self, execute_mock, unused_configure_mock, smoketest_presto_mock, create_connectors_mock):
        presto_coordinator = Coordinator()

        presto_coordinator.start(self.mock_env)

        assert smoketest_presto_mock.called
    def test_install_start_configure_presto(
            self, unused_execute_mock, configure_mock, unused_smoketest_presto):
        presto_coordinator = Coordinator()

        presto_coordinator.install(self.mock_env)
        assert configure_mock.called
        configure_mock.reset_mock()

        presto_coordinator.start(self.mock_env)
        assert configure_mock.called
示例#5
0
    def test_install_start_configure_presto(
            self, unused_execute_mock, configure_mock, unused_smoketest_presto):
        presto_coordinator = Coordinator()

        presto_coordinator.install(self.mock_env)
        assert configure_mock.called
        configure_mock.reset_mock()

        presto_coordinator.start(self.mock_env)
        assert configure_mock.called
    def test_lifecycle_methods_shell_out_to_execute(
            self, execute_mock, unused_configure_mock, unused_smoketest_presto):
        presto_coordinator = Coordinator()

        presto_coordinator.install(self.mock_env)
        assert execute_mock.call_count is 2
        assert 'wget' in execute_mock.call_args_list[0][0][0]
        assert 'rpm -i' in execute_mock.call_args_list[1][0][0]
        execute_mock.reset_mock()

        presto_coordinator.stop(self.mock_env)
        assert execute_mock.call_count is 1
        assert 'stop' in execute_mock.call_args_list[0][0][0]
        execute_mock.reset_mock()

        presto_coordinator.start(self.mock_env)
        assert execute_mock.call_count is 1
        assert 'start' in execute_mock.call_args_list[0][0][0]
        execute_mock.reset_mock()

        presto_coordinator.status(self.mock_env)
        assert execute_mock.call_count is 1
        assert 'status' in execute_mock.call_args_list[0][0][0]