Skip to content
Snippets Groups Projects
Commit 255ae9e0 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon: Committed by Yaroslav Dynnikov
Browse files

fix: used to not provide pico_service password on initial replication configuration

parent cadcb4e3
No related branches found
No related tags found
1 merge request!895fix: wrong pico_service password + picodata expel --user
......@@ -164,8 +164,9 @@ impl Cfg {
/// initialized cluster.
pub fn for_instance_join(config: &PicodataConfig, resp: &join::Response) -> Self {
let mut replication_cfg = Vec::with_capacity(resp.box_replication.len());
let password = crate::pico_service::pico_service_password();
for address in &resp.box_replication {
replication_cfg.push(format!("{PICO_SERVICE_USER_NAME}:@{address}"))
replication_cfg.push(format!("{PICO_SERVICE_USER_NAME}:{password}@{address}"))
}
let mut res = Self {
......
......@@ -117,7 +117,9 @@ def test_parallel(cluster3: Cluster):
def test_replication(cluster: Cluster):
cluster.deploy(instance_count=2, init_replication_factor=2)
cluster.deploy(
instance_count=2, init_replication_factor=2, service_password="secret"
)
i1, i2 = cluster.instances
assert i1.replicaset_uuid() == i2.replicaset_uuid()
......@@ -125,7 +127,7 @@ def test_replication(cluster: Cluster):
def check_replicated(instance):
box_replication = instance.eval("return box.cfg.replication")
assert set(box_replication) == set(
(f"pico_service:@{addr}" for addr in [i1.listen, i2.listen])
(f"pico_service:secret@{addr}" for addr in [i1.listen, i2.listen])
), instance
for instance in cluster.instances:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment