MCPcopy Create free account
hub / github.com/dagger/dagger / TestExecWithEnvVariable

Method TestExecWithEnvVariable

core/integration/container_test.go:816–841  ·  view source on GitHub ↗
(ctx context.Context, t *testctx.T)

Source from the content-addressed store, hash-verified

814}
815
816func (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
843func (ContainerSuite) TestVariables(ctx context.Context, t *testctx.T) {
844 res, err := testutil.Query[struct {

Callers

nothing calls this directly

Calls 2

QueryFunction · 0.92
ContainsMethod · 0.65

Tested by

no test coverage detected