# Environment variable interpolation

**URL:** <https://discuss.circleci.com/t/environment-variable-interpolation/32180>\
**Category:** Running Tests\
**Created:** [August 30, 2019, 5:53am UTC](https://discuss.circleci.com/t/environment-variable-interpolation/32180 "2019-08-30T05:53:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrkingz](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mrkingz](https://discuss.circleci.com/u/mrkingz)\
**Post date:** [August 30, 2019, 5:53am UTC](https://discuss.circleci.com/t/environment-variable-interpolation/32180/1 "2019-08-30T05:53:49Z")

</div>

I have set my environment variables as depicted in the following photo:

 ![48%20AM](https://global.discourse-cdn.com/circleci/original/3X/c/c/ccbfa06b75b8cff9457a2e910da3233dfef22f77.png)  
Also, the following is my config.yml file

```auto
version: 2.1
jobs:
  build:
    parameters:
      db_user:
        type: env_var_name
        default: TEST_DB_USERNAME
      db_password: 
        type: env_var_name
        default: DB_PASSWORD
      test_db_name:
        type: env_var_name
        default: TEST_DB_NAME
    docker:
      # specify the version you desire here
      - image: circleci/node:11.6.0
        environment:
          NODE_ENV: test

      # setup test database
      - image: circleci/postgres:9.6.2-alpine
        environment:
          POSTGRES_USER: << parameters.db_user >>
          POSTGRES_DB: cmrc_db_test
          POSTGRES_PASSWORD: << parameters.db_password >>

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package.json" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-

      - run: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      # run tests!
      - run:
          name: Run Tests
          command: npm run ci:test

```

However, on trying to run my ci test, I keep getting the following error: `error: database "cmrc_db_test" does not exist (line 841)`  
I know what causes the error, but I can’t find a way to remove the double quotes from the interpolated test\_db\_name (TEST\_DB\_NAME) variable.

I will appreciate your help, as all efforts in trying to resolve this are not yielding.

---

<div class="post-metadata">

**Author:** ![mrkingz](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mrkingz](https://discuss.circleci.com/u/mrkingz)\
**Post date:** [September 2, 2019, 8:28am UTC](https://discuss.circleci.com/t/environment-variable-interpolation/32180/3 "2019-09-02T08:28:58Z")

</div>

Oh! Thanks for pointing that out.

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [September 2, 2019, 9:51pm UTC](https://discuss.circleci.com/t/environment-variable-interpolation/32180/4 "2019-09-02T21:51:41Z")

</div>

> [@mrkingz](#):
>
> I know what causes the error, but I can’t find a way to remove the double quotes from the interpolated test\_db\_name

I don’t have any view on it myself, but are you sure that the quote marks in the error are not just part of the error message, and are not in the env var value?
