From ab2a6414a2c515b19a45284e258d9162f8e48384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C4=8Ctvrtka?= Date: Mon, 10 Jun 2024 13:02:16 +0200 Subject: [PATCH] PMM-13129 Encryption test. --- encryption/encryption_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/encryption/encryption_test.go b/encryption/encryption_test.go index 77d4dfb2f7..29dead5165 100644 --- a/encryption/encryption_test.go +++ b/encryption/encryption_test.go @@ -9,10 +9,9 @@ import ( ) func TestEncryption(t *testing.T) { - testPath := "/Users/jiri.ctvrtka/pmm-encryption.key" secret := "password1" - err := create(testPath) + err := create(DefaultEncryptionKeyPath) require.NoError(t, err) cipherText, err := Encrypt(secret) require.NoError(t, err) @@ -24,13 +23,14 @@ func TestEncryption(t *testing.T) { c := &DatabaseConnection{ Host: "127.0.0.1", Port: 5432, - User: "pmm-agent", - Password: "pmm-agent-password", + User: "postgres", + Password: "", + SSLMode: "disable", EncryptedItems: []EncryptedItem{ { Database: "pmm-agent", - Table: "acc", - Identificators: []string{"id"}, + Table: "agents", + Identificators: []string{"agent_id"}, Columns: []string{"username", "password"}, }, },