← Back to team overview

wordpress-charmers team mailing list archive

[Merge] ~tcuthbert/charm-k8s-wordpress:update_charm into charm-k8s-wordpress:master

 

Thomas Cuthbert has proposed merging ~tcuthbert/charm-k8s-wordpress:update_charm into charm-k8s-wordpress:master.

Commit message:
Update charm name to follow best practice naming convention.

Requested reviews:
  Canonical IS Reviewers (canonical-is-reviewers)
  Wordpress Charmers (wordpress-charmers)

For more details, see:
https://code.launchpad.net/~tcuthbert/charm-k8s-wordpress/+git/charm-k8s-wordpress-1/+merge/393590
-- 
Your team Wordpress Charmers is requested to review the proposed merge of ~tcuthbert/charm-k8s-wordpress:update_charm into charm-k8s-wordpress:master.
diff --git a/metadata.yaml b/metadata.yaml
index 54024b3..eca73b7 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -1,4 +1,4 @@
-name: "wordpress-k8s"
+name: "wordpress"
 summary: "Wordpress, uses official Docker Wordpress image by default"
 description: "Wordpress, uses official Docker Wordpress image by default"
 min-juju-version: 2.8.0
diff --git a/src/charm.py b/src/charm.py
index 68d3b60..2360239 100755
--- a/src/charm.py
+++ b/src/charm.py
@@ -102,7 +102,7 @@ class WordpressCharmEvents(CharmEvents):
     wordpress_initialise = EventSource(WordpressInitialiseEvent)
 
 
-class WordpressK8sCharm(CharmBase):
+class WordpressCharm(CharmBase):
     state = StoredState()
     # Override the default list of event handlers with our WordpressCharmEvents subclass.
     on = WordpressCharmEvents()
diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py
index 795b0fa..1840a4c 100644
--- a/tests/unit/test_charm.py
+++ b/tests/unit/test_charm.py
@@ -4,7 +4,7 @@ import copy
 import mock
 import unittest
 
-from charm import WordpressK8sCharm, create_wordpress_secrets, gather_wordpress_secrets
+from charm import WordpressCharm, create_wordpress_secrets, gather_wordpress_secrets
 from wordpress import WORDPRESS_SECRETS
 from ops import testing
 from ops.model import BlockedStatus
@@ -22,12 +22,12 @@ class TestLeadershipData:
         return self.data.get(k)
 
 
-class TestWordpressK8sCharm(unittest.TestCase):
+class TestWordpressCharm(unittest.TestCase):
 
     test_model_config = TEST_MODEL_CONFIG
 
     def setUp(self):
-        self.harness = testing.Harness(WordpressK8sCharm)
+        self.harness = testing.Harness(WordpressCharm)
 
         self.harness.begin()
         self.harness.update_config(copy.deepcopy(self.test_model_config))
@@ -91,7 +91,7 @@ class TestWordpressK8sCharm(unittest.TestCase):
             "tls_secret_name": "blog-example-com-tls"
         })
         # Test for https://bugs.launchpad.net/juju/+bug/1884674
-        ingress_name = 'wordpress-k8s-ingress'
+        ingress_name = 'wordpress-ingress'
         self.assertNotEqual(ingress_name, self.harness.charm.app.name)
 
         expected = {
@@ -111,7 +111,7 @@ class TestWordpressK8sCharm(unittest.TestCase):
                                         'paths': [
                                             {
                                                 'path': '/',
-                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 80},
+                                                'backend': {'serviceName': 'wordpress', 'servicePort': 80},
                                             }
                                         ]
                                     },

Follow ups