From 4016bd1edf0e352458f9bdfa7bfb414a48ce546f Mon Sep 17 00:00:00 2001
From: Boxiang Sun <boxiang.sun@nexedi.com>
Date: Thu, 5 Aug 2021 01:23:12 +0200
Subject: [PATCH] sotware/caddy-frontend: Use instance-caddy-replicate.cfg to
 replace buildout-switch-softwaretype.cfg

Because when using the switch-software, the
buildout-switch-sofwtwaretype.cfg will not be generated, see
https://lab.nexedi.com/nexedi/slapos/blob/master/slapos/recipe/softwaretype.py#L264-267
So use instance-caddy-replicate.cfg instead, which has same effect.
---
 software/caddy-frontend/test/test.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/software/caddy-frontend/test/test.py b/software/caddy-frontend/test/test.py
index e7040830a..247dcbe2e 100644
--- a/software/caddy-frontend/test/test.py
+++ b/software/caddy-frontend/test/test.py
@@ -1813,7 +1813,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
 
   def test_server_polluted_keys_removed(self):
     buildout_file = os.path.join(
-      self.getMasterPartitionPath(), 'buildout-switch-softwaretype.cfg')
+      self.getMasterPartitionPath(), 'instance-caddy-replicate.cfg')
     for line in [
       q for q in open(buildout_file).readlines()
       if q.startswith('config-slave-list') or q.startswith(
@@ -4590,7 +4590,7 @@ class TestReplicateSlaveOtherDestroyed(SlaveHttpFrontendTestCase):
     self.slap.waitForInstance(self.instance_max_retry)
 
     buildout_file = os.path.join(
-      self.getMasterPartitionPath(), 'buildout-switch-softwaretype.cfg')
+      self.getMasterPartitionPath(), 'instance-caddy-replicate.cfg')
     with open(buildout_file) as fh:
       buildout_file_content = fh.read()
       node_1_present = re.search(
-- 
2.30.9