Skip to content

Commit

Permalink
PMM-13129 Encryption test.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriCtvrtka committed Jun 10, 2024
1 parent b9f8cd8 commit ab2a641
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions encryption/encryption_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"},
},
},
Expand Down

0 comments on commit ab2a641

Please sign in to comment.