Browse Source

allow DB_BACKEND to be expanded (#1400)

* allow DB_BACKEND to be expanded

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
Manuel Sabban 3 years ago
parent
commit
b076f1d582
3 changed files with 3 additions and 3 deletions
  1. 1 1
      tests/lib/db/instance-mysql
  2. 1 1
      tests/lib/db/instance-postgres
  3. 1 1
      tests/lib/db/instance-sqlite

+ 1 - 1
tests/lib/db/instance-mysql

@@ -87,7 +87,7 @@ restore() {
 
 config_yaml() {
     MYSQL_PORT=${MYSQL_PORT} MYSQL_HOST=${MYSQL_HOST} yq '
-        .db_config.type="$DB_BACKEND"|
+        .db_config.type=strenv(DB_BACKEND)|
         .db_config.user="crowdsec_test" |
         .db_config.password="crowdsec_test" |
         .db_config.db_name="crowdsec_test"  |

+ 1 - 1
tests/lib/db/instance-postgres

@@ -61,7 +61,7 @@ restore() {
 
 config_yaml() {
     yq '
-        .db_config.type="$DB_BACKEND"|
+        .db_config.type=strenv(DB_BACKEND)|
         .db_config.user="crowdsec_test" |
         .db_config.password="crowdsec_test" |
         .db_config.db_name="crowdsec_test"  |

+ 1 - 1
tests/lib/db/instance-sqlite

@@ -31,7 +31,7 @@ DB_FILE="${DATA_DIR}/crowdsec.db"
 
 config_yaml() {
     yq '
-        .db_config.type="$DB_BACKEND" |
+        .db_config.type=strenv(DB_BACKEND) |
         .db_config.db_path="${DB_FILE}"
     ' -i "${CONFIG_YAML}"
 }