From d2cddb9f938ed6f3d4466697768997a643f9e6ea Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Fri, 23 Feb 2024 21:24:37 +0200 Subject: [PATCH] Remove \t from medusa.ini --- pkg/medusa/reconcile.go | 10 +++++----- pkg/medusa/reconcile_test.go | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/medusa/reconcile.go b/pkg/medusa/reconcile.go index b7a3b02c7..bdf17aa2b 100644 --- a/pkg/medusa/reconcile.go +++ b/pkg/medusa/reconcile.go @@ -140,13 +140,13 @@ func CreateMedusaIni(kc *k8ss.K8ssandraCluster, dcConfig *cassandra.DatacenterCo // Create Kubernetes config here and append it if dcConfig.ManagementApiAuth != nil && dcConfig.ManagementApiAuth.Manual != nil { medusaConfiig += ` - cassandra_url = https://127.0.0.1:8080/api/v0/ops/node/snapshots - ca_cert = /etc/encryption/mgmt/ca.crt - tls_cert = /etc/encryption/mgmt/tls.crt - tls_key = /etc/encryption/mgmt/tls.key` + cassandra_url = https://127.0.0.1:8080/api/v0/ops/node/snapshots + ca_cert = /etc/encryption/mgmt/ca.crt + tls_cert = /etc/encryption/mgmt/tls.crt + tls_key = /etc/encryption/mgmt/tls.key` } else { medusaConfiig += ` - cassandra_url = http://127.0.0.1:8080/api/v0/ops/node/snapshots` + cassandra_url = http://127.0.0.1:8080/api/v0/ops/node/snapshots` } return medusaConfiig diff --git a/pkg/medusa/reconcile_test.go b/pkg/medusa/reconcile_test.go index 4f8044388..e55f2abd7 100644 --- a/pkg/medusa/reconcile_test.go +++ b/pkg/medusa/reconcile_test.go @@ -236,6 +236,8 @@ func testMedusaIniSecured(t *testing.T) { assert.Contains(medusaIni, "tls_cert = /etc/encryption/mgmt/tls.crt") assert.Contains(medusaIni, "tls_key = /etc/encryption/mgmt/tls.key") assert.Contains(medusaIni, "cassandra_url = https://127.0.0.1:8080/api/v0/ops/node/snapshots") + + assert.NotContains(medusaIni, "\t") } func testMedusaIniSecuredDcLevelSetting(t *testing.T) {