1212from tenacity import Retrying , stop_after_attempt
1313
1414from .. import architecture
15- from ..high_availability_helpers_new import (
15+ from ..high_availability . high_availability_helpers_new import (
1616 get_app_leader ,
1717 get_app_units ,
1818 get_db_max_written_value ,
@@ -43,7 +43,7 @@ def second_model(juju: Juju, lxd_spaces, request: pytest.FixtureRequest) -> Gene
4343
4444 logging .info (f"Creating model: { model_name } " )
4545 juju .add_model (model_name )
46- model_2 = Juju (model = first_model )
46+ model_2 = Juju (model = model_name )
4747 model_2 .cli ("reload-spaces" )
4848 model_2 .cli ("add-space" , "client" , "10.0.0.1/24" )
4949 model_2 .cli ("add-space" , "peers" , "10.10.10.1/24" )
@@ -102,8 +102,6 @@ def test_deploy(first_model: str, second_model: str, lxd_spaces, charm) -> None:
102102 bind = bind ,
103103 num_units = 3 ,
104104 )
105- # TODO switch to 1/stable
106- model_1 .deploy (charm = "self-signed-certificates" , channel = "latest/stable" , base = "ubuntu@22.04" )
107105
108106 model_2 = Juju (model = second_model )
109107 model_2 .deploy (
@@ -115,20 +113,34 @@ def test_deploy(first_model: str, second_model: str, lxd_spaces, charm) -> None:
115113 bind = bind ,
116114 num_units = 3 ,
117115 )
116+
118117 # TODO switch to 1/stable
119- model_2 .deploy (charm = "self-signed-certificates" , channel = "latest/stable" , base = "ubuntu@22.04" )
118+ logging .info ("Deploying tls operators" )
119+ constraints = {"arch" : architecture .architecture }
120+ model_1 .deploy (
121+ charm = "self-signed-certificates" ,
122+ channel = "latest/stable" ,
123+ constraints = constraints ,
124+ base = "ubuntu@22.04" ,
125+ )
126+ model_2 .deploy (
127+ charm = "self-signed-certificates" ,
128+ channel = "latest/stable" ,
129+ constraints = constraints ,
130+ base = "ubuntu@22.04" ,
131+ )
120132
121- model_1 .integrate (f"{ DB_TEST_APP_1 } :client-certificates" , "self-signed-certificates" )
122- model_1 .integrate (f"{ DB_TEST_APP_1 } :peer-certificates" , "self-signed-certificates" )
123- model_2 .integrate (f"{ DB_TEST_APP_2 } :client-certificates" , "self-signed-certificates" )
124- model_2 .integrate (f"{ DB_TEST_APP_2 } :peer-certificates" , "self-signed-certificates" )
133+ model_1 .integrate (f"{ DB_APP_1 } :client-certificates" , "self-signed-certificates" )
134+ model_1 .integrate (f"{ DB_APP_1 } :peer-certificates" , "self-signed-certificates" )
135+ model_2 .integrate (f"{ DB_APP_2 } :client-certificates" , "self-signed-certificates" )
136+ model_2 .integrate (f"{ DB_APP_2 } :peer-certificates" , "self-signed-certificates" )
125137
126138 model_1 .offer (f"{ first_model } .self-signed-certificates" , endpoint = "send-ca-cert" )
127139 model_2 .consume (f"{ first_model } .self-signed-certificates" , "send-ca-offer" )
128- model_2 .integrate (DB_TEST_APP_2 , "send-ca-offer" )
140+ model_2 .integrate (DB_APP_2 , "send-ca-offer" )
129141 model_2 .offer (f"{ second_model } .self-signed-certificates" , endpoint = "send-ca-cert" )
130142 model_1 .consume (f"{ second_model } .self-signed-certificates" , "send-ca-offer" )
131- model_1 .integrate (DB_TEST_APP_1 , "send-ca-offer" )
143+ model_1 .integrate (DB_APP_1 , "send-ca-offer" )
132144
133145 logging .info ("Deploying test application" )
134146 constraints = {"arch" : architecture .architecture , "spaces" : "client" }
0 commit comments