wordpress-charmers team mailing list archive
-
wordpress-charmers team
-
Mailing list archive
-
Message #00095
Re: [Merge] ~barryprice/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master
Review: Approve
One minor comment, other than that looks good, thanks.
Diff comments:
> diff --git a/tests/unit/test_plugin_hander.py b/tests/unit/test_plugin_hander.py
> new file mode 100644
> index 0000000..82c0fec
> --- /dev/null
> +++ b/tests/unit/test_plugin_hander.py
> @@ -0,0 +1,32 @@
> +import os
> +import sys
> +import unittest
> +from unittest import mock
> +
> +sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
> +from files import plugin_handler # NOQA: E402
> +
> +
> +class testWrapper(unittest.TestCase):
> + def setUp(self):
> + self.maxDiff = None
> +
> + @mock.patch("files.plugin_handler.logging")
> + def test_team_mapper(self, foo):
> + given = ",".join([
> + "canonical-sysadmins=administrator",
> + "canonical-website-editors=editor",
> + "canonical-website-admins=administrator,launchpad=editor"
This should be two lines, for consistency.
> + ])
> + want = "".join([
> + """a:4:{i:1;O:8:"stdClass":4:{s:2:"id";i:1;s:4:"team";s:19:"canonical-sysadmins";""",
> + """s:4:"role";s:13:"administrator";s:6:"server";s:1:"0";}""",
> + """i:2;O:8:"stdClass":4:{s:2:"id";i:2;s:4:"team";s:25:"canonical-website-editors";""",
> + """s:4:"role";s:6:"editor";s:6:"server";s:1:"0";}""",
> + """i:3;O:8:"stdClass":4:{s:2:"id";i:3;s:4:"team";s:24:"canonical-website-admins";""",
> + """s:4:"role";s:13:"administrator";s:6:"server";s:1:"0";}""",
> + """i:4;O:8:"stdClass":4:{s:2:"id";i:4;s:4:"team";s:9:"launchpad";""",
> + """s:4:"role";s:6:"editor";s:6:"server";s:1:"0";}}"""
> + ])
> + got = plugin_handler.encode_team_map(given)
> + self.assertEqual(got, want)
--
https://code.launchpad.net/~barryprice/charm-k8s-wordpress/+git/wordpress-k8s-image-builder/+merge/380153
Your team Wordpress Charmers is subscribed to branch ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.
References