From 8b62e2694ae7fb1bda558b97f4093cf098f75af3 Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Thu, 5 Sep 2024 10:01:56 +0100 Subject: [PATCH] Test non-ascii secret interpolation --- test/integration/docker/deployer/app/.kamal/secrets | 3 ++- test/integration/docker/deployer/app/config/deploy.yml | 1 + test/integration/main_test.rb | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/integration/docker/deployer/app/.kamal/secrets b/test/integration/docker/deployer/app/.kamal/secrets index 454ba88f..ee55e94c 100644 --- a/test/integration/docker/deployer/app/.kamal/secrets +++ b/test/integration/docker/deployer/app/.kamal/secrets @@ -1,5 +1,6 @@ SECRET_TOKEN='1234 with "中文"' SECRET_TAG='TAGME' -SECRETS=$(kamal secrets fetch --adapter test --account test INTERPOLATED_SECRET1 INTERPOLATED_SECRET2) +SECRETS=$(kamal secrets fetch --adapter test --account test INTERPOLATED_SECRET1 INTERPOLATED_SECRET2 INTERPOLATED_中文) INTERPOLATED_SECRET1=$(kamal secrets extract INTERPOLATED_SECRET1 ${SECRETS}) INTERPOLATED_SECRET2=$(kamal secrets extract INTERPOLATED_SECRET2 ${SECRETS}) +INTERPOLATED_SECRET3=$(kamal secrets extract INTERPOLATED_中文 ${SECRETS}) diff --git a/test/integration/docker/deployer/app/config/deploy.yml b/test/integration/docker/deployer/app/config/deploy.yml index ae67ea3e..a85412ad 100644 --- a/test/integration/docker/deployer/app/config/deploy.yml +++ b/test/integration/docker/deployer/app/config/deploy.yml @@ -12,6 +12,7 @@ env: - SECRET_TOKEN - INTERPOLATED_SECRET1 - INTERPOLATED_SECRET2 + - INTERPOLATED_SECRET3 tags: tag1: CLEAR_TAG: tagged diff --git a/test/integration/main_test.rb b/test/integration/main_test.rb index 4967002d..5b12d857 100644 --- a/test/integration/main_test.rb +++ b/test/integration/main_test.rb @@ -112,6 +112,7 @@ class MainTest < IntegrationTest assert_env :SECRET_TAG, "TAGME", version: version, vm: :vm2 assert_env :INTERPOLATED_SECRET1, "1TERCES_DETALOPRETNI", version: version, vm: :vm2 assert_env :INTERPOLATED_SECRET2, "2TERCES_DETALOPRETNI", version: version, vm: :vm2 + assert_env :INTERPOLATED_SECRET3, "文中_DETALOPRETNI", version: version, vm: :vm2 end def assert_env(key, value, vm:, version:)