How can I set environment variables for dredd testing in a dredd.yml file?
<p>I'm trying to run a number of api calls using <a href="https://dredd.readthedocs.io/en/latest/" rel="nofollow">dredd</a> and <a href="https://apiblueprint.org/" rel="nofollow">api blueprint</a> to test a site. I would like to run the tests on circleCI, as there are Selenium tests running in the same place. Each transaction needs to be accompanied by two tokens, which are set as cookies in the headers. Ideally, these would be set in the dredd.yml file. When running on a local machine, if I replace <code>ACCESS_TOKEN</code> and <code>REFRESH_TOKEN</code> with the actual values, the test runs as expected.</p>

<p>circle.yml:</p>

<pre><code>test:
    override:
            - dredd
</code></pre>

<p>dredd.yml headers</p>

<pre><code>header: ['Cookie: access_token=ACCESS_TOKEN; refresh_token=REFRESH_TOKEN']
</code></pre>

<p>Where ACCESS_TOKEN and REFRESH_TOKEN get replaced by the actual values set in circleCI's environment variables. I have also tried:<code>access_token=$[ACCESS_TOKEN]</code>, <code>access_token=$["ACCESS_TOKEN"]</code> and <code>access_token=$ACCESS_TOKEN</code>. None of these are being replaced in the headers for the first api call.</p>

<p>The header looks like: <code>{"Content-Type":"application/json; charset=utf-8","User-Agent":"Dredd/1.4.0 (Darwin 14.5.0; x64)","Cookie":" access_token=$ACCESS_TOKEN; refresh_token=$REFRESH_TOKEN"}</code></p>

<p>I am new to yaml files, so I'm probably missing something basic, but I did search around for a while. The hooks file is written with node.js, so I don't think the ruby/rails help will be useful here. If I am missing anything in the question don't hesitate to let me know.</p>