GoogleContainerTools / GoogleContainerTools/container-structure-test

cannot reuse .env in expectedOutput

Open
#196 2 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Go
Stars
2.5k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

My images are built by docker compose based on ARGs which are taken values from `.env`.

I would like to make the assertion accordingly:

**.env**

```env
NODE_TAG=11.8.0
```

**config.yml**
```yml
schemaVersion: '2.0.0'

globalEnvVars:
- key: "NODE_TAG"
value: "$NODE_TAG"
commandTests:
- name: "node version"
command: "node"
args: ["-v"]
expectedOutput: ["$NODE_TAG"]
```

When I ran tests, I got:

**stdout**
```
--- FAIL
stdout: v11.8.0
Error: Expected string '$NODE_TAG' not found in output 'v11.8.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.