| 814 | } |
| 815 | |
| 816 | func (ContainerSuite) TestExecWithEnvVariable(ctx context.Context, t *testctx.T) { |
| 817 | res, err := testutil.Query[struct { |
| 818 | Container struct { |
| 819 | From struct { |
| 820 | WithEnvVariable struct { |
| 821 | WithExec struct { |
| 822 | Stdout string |
| 823 | } |
| 824 | } |
| 825 | } |
| 826 | } |
| 827 | }](t, |
| 828 | `{ |
| 829 | container { |
| 830 | from(address: "`+alpineImage+`") { |
| 831 | withEnvVariable(name: "FOO", value: "bar") { |
| 832 | withExec(args: ["env"]) { |
| 833 | stdout |
| 834 | } |
| 835 | } |
| 836 | } |
| 837 | } |
| 838 | }`, nil) |
| 839 | require.NoError(t, err) |
| 840 | require.Contains(t, res.Container.From.WithEnvVariable.WithExec.Stdout, "FOO=bar\n") |
| 841 | } |
| 842 | |
| 843 | func (ContainerSuite) TestVariables(ctx context.Context, t *testctx.T) { |
| 844 | res, err := testutil.Query[struct { |