Exemplo n.º 1
0
 def test_system_info(self):
     instance = info_command.AirflowInfo(info_command.NullAnonymizer())
     expected = {
         'uname', 'architecture', 'OS', 'python_location', 'locale',
         'python_version'
     }
     assert self.unique_items(instance._system_info) == expected
Exemplo n.º 2
0
 def test_should_read_config(self):
     instance = info_command.ConfigInfo(info_command.NullAnonymizer())
     text = capture_show_output(instance)
     assert "TEST_EXECUTOR" in text
     assert "TEST_DAGS_FOLDER" in text
     assert "TEST_PLUGINS_FOLDER" in text
     assert "TEST_LOG_FOLDER" in text
     assert "postgresql+psycopg2://postgres:airflow@postgres/airflow" in text
Exemplo n.º 3
0
 def test_should_read_config(self):
     instance = info_command.ConfigInfo(info_command.NullAnonymizer())
     text = str(instance)
     self.assertIn("TEST_EXECUTOR", text)
     self.assertIn("TEST_DAGS_FOLDER", text)
     self.assertIn("TEST_PLUGINS_FOLDER", text)
     self.assertIn("TEST_LOG_FOLDER", text)
     self.assertIn("postgresql+psycopg2://postgres:airflow@postgres/airflow", text)
Exemplo n.º 4
0
 def test_should_read_logging_configuration(self):
     with conf_vars({
         ('logging', 'remote_logging'): 'True',
         ('logging', 'remote_base_log_folder'): 'stackdriver://logs-name',
     }):
         importlib.reload(airflow_local_settings)
         configure_logging()
         instance = info_command.ConfigInfo(info_command.NullAnonymizer())
         text = str(instance)
         self.assertIn("StackdriverTaskHandler", text)
Exemplo n.º 5
0
 def test_tools_info(self):
     instance = info_command.AirflowInfo(info_command.NullAnonymizer())
     expected = {
         'cloud_sql_proxy',
         'gcloud',
         'git',
         'kubectl',
         'mysql',
         'psql',
         'sqlite3',
         'ssh',
     }
     assert self.unique_items(instance._tools_info) == expected
Exemplo n.º 6
0
    def test_airflow_info(self):
        importlib.reload(airflow_local_settings)
        configure_logging()

        instance = info_command.AirflowInfo(info_command.NullAnonymizer())
        expected = {
            'executor',
            'version',
            'task_logging_handler',
            'plugins_folder',
            'base_log_folder',
            'remote_base_log_folder',
            'dags_folder',
            'sql_alchemy_conn',
        }
        assert self.unique_items(instance._airflow_info) == expected
Exemplo n.º 7
0
 def test_info(self):
     instance = info_command.PathsInfo(info_command.NullAnonymizer())
     text = capture_show_output(instance)
     self.assertIn("Paths info", text)
Exemplo n.º 8
0
 def test_info(self):
     instance = info_command.AirflowInfo(info_command.NullAnonymizer())
     text = capture_show_output(instance)
     self.assertIn("Apache Airflow", text)
     self.assertIn(airflow_version, text)
Exemplo n.º 9
0
 def test_should_be_string(self):
     self.assertTrue(
         str(info_command.PathsInfo(info_command.NullAnonymizer())))
Exemplo n.º 10
0
    def test_should_be_string(self):
        text = str(info_command.AirflowInfo(info_command.NullAnonymizer()))

        self.assertIn("Apache Airflow [{}]".format(airflow_version), text)
Exemplo n.º 11
0
 def test_info(self):
     instance = info_command.SystemInfo(info_command.NullAnonymizer())
     text = capture_show_output(instance)
     assert "System info" in text
Exemplo n.º 12
0
 def test_info(self):
     instance = info_command.AirflowInfo(info_command.NullAnonymizer())
     text = capture_show_output(instance)
     assert "Apache Airflow" in text
     assert airflow_version in text
Exemplo n.º 13
0
 def test_paths_info(self):
     instance = info_command.AirflowInfo(info_command.NullAnonymizer())
     expected = {'airflow_on_path', 'airflow_home', 'system_path', 'python_path'}
     assert self.unique_items(instance._paths_info) == expected