def test_simple(self): task = SSHExecuteOperator( task_id="test", bash_command="echo airflow", ssh_hook=self.hook, dag=self.dag, ) task.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, ignore_ti_state=True)
def test_simple(self): task = SSHExecuteOperator( task_id="test", bash_command="echo airflow", ssh_hook=self.hook, dag=self.dag, ) task.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, force=True)
def test_with_env(self): task = SSHExecuteOperator( task_id="test", bash_command="echo $AIRFLOW_HOME", ssh_hook=self.hook, env={"AIRFLOW_test": "test"}, dag=self.dag, ) task.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, force=True)
def test_simple(self, temp_file): temp_file.return_value.__enter__ = lambda x: 'filepath' task = SSHExecuteOperator( task_id="test", bash_command="echo airflow", ssh_hook=self.hook, dag=self.dag, ) task.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, ignore_ti_state=True)
def test_with_env(self): test_env = os.environ.copy() test_env['AIRFLOW_test'] = "test" task = SSHExecuteOperator( task_id="test", bash_command="echo $AIRFLOW_HOME", ssh_hook=self.hook, env=test_env, dag=self.dag, ) task.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, ignore_ti_state=True)
def test_with_env(self, temp_file): temp_file.return_value.__enter__ = lambda x: 'filepath' test_env = os.environ.copy() test_env['AIRFLOW_test'] = "test" task = SSHExecuteOperator( task_id="test", bash_command="echo $AIRFLOW_HOME", ssh_hook=self.hook, env=test_env['AIRFLOW_test'], dag=self.dag, ) task.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, ignore_ti_state=True)