You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by tu...@apache.org on 2020/10/07 13:09:33 UTC

[airflow] branch v1-10-test updated: Fix interpolation issue in conf_vars in tests (#11326)

This is an automated email from the ASF dual-hosted git repository.

turbaszek pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v1-10-test by this push:
     new 2900f13  Fix interpolation issue in conf_vars in tests (#11326)
2900f13 is described below

commit 2900f13403b3854152cb640c49dca415b2c6ddd9
Author: Tomek Urbaszek <tu...@gmail.com>
AuthorDate: Wed Oct 7 15:08:24 2020 +0200

    Fix interpolation issue in conf_vars in tests (#11326)
    
    It seems that using conf_vars for strings with interpolation
    breaks config parser because proper string is replaced by already
    interpolated string. This fix errors from v1-10-test
---
 tests/test_utils/config.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test_utils/config.py b/tests/test_utils/config.py
index dfe56d0..74d6202 100644
--- a/tests/test_utils/config.py
+++ b/tests/test_utils/config.py
@@ -51,6 +51,7 @@ def conf_vars(overrides):
     finally:
         for (section, key), value in original.items():
             if value is not None:
+                value = value.replace("%(", "%%(")  # Hack to make interpolation work
                 conf.set(section, key, value)
             else:
                 conf.remove_option(section, key)