← Back to team overview

wordpress-charmers team mailing list archive

Re: [Merge] ~mthaddon/charm-k8s-wordpress/+git/charm-k8s-wordpress:admin-not-tls into charm-k8s-wordpress:master

 

Review: Approve

Yup. Minor comment inline.

Diff comments:

> diff --git a/tests/unit/test_wordpress.py b/tests/unit/test_wordpress.py
> index 92712e7..47cf8be 100644
> --- a/tests/unit/test_wordpress.py
> +++ b/tests/unit/test_wordpress.py
> @@ -82,6 +82,15 @@ class HelperTest(unittest.TestCase):
>          test_container_config = yaml.safe_load(self.test_model_config["container_config"])
>          self.assertEqual(test_container_config["test-key"], result["test-key"])
>  
> +        # Test we pass set WORDPRESS_TLS_ENABLED if we have `tls_secret_name`.
> +        result = charm.generate_pod_config(self.test_model_config)
> +        self.assertNotIn("WORDPRESS_TLS_DISABLED", result)
> +        # Remove `tls_secret_name` and test again.
> +        non_tls_secret_config = copy.deepcopy(self.test_model_config)

It is a single level dict of strings.... dict(self.test_model_config) should be enough to make a copy if you prefer.

> +        non_tls_secret_config["tls_secret_name"] = ""
> +        result = charm.generate_pod_config(non_tls_secret_config)
> +        self.assertEqual(result["WORDPRESS_TLS_DISABLED"], "true")
> +
>  
>  class WordpressTest(unittest.TestCase):
>  


-- 
https://code.launchpad.net/~mthaddon/charm-k8s-wordpress/+git/charm-k8s-wordpress/+merge/396185
Your team Wordpress Charmers is subscribed to branch charm-k8s-wordpress:master.


References