(ctx context.Context, t *testctx.T)
| 2752 | } |
| 2753 | |
| 2754 | func (ContainerSuite) TestRelativePaths(ctx context.Context, t *testctx.T) { |
| 2755 | c := connect(ctx, t) |
| 2756 | |
| 2757 | dirRes, err := testutil.QueryWithClient[struct { |
| 2758 | Directory struct { |
| 2759 | WithNewFile struct { |
| 2760 | ID core.DirectoryID |
| 2761 | } |
| 2762 | } |
| 2763 | }](c, t, |
| 2764 | `{ |
| 2765 | directory { |
| 2766 | withNewFile(path: "some-file", contents: "some-content") { |
| 2767 | id |
| 2768 | } |
| 2769 | } |
| 2770 | }`, nil) |
| 2771 | require.NoError(t, err) |
| 2772 | |
| 2773 | id := dirRes.Directory.WithNewFile.ID |
| 2774 | |
| 2775 | cacheID := newCache(t) |
| 2776 | writeRes, err := testutil.QueryWithClient[struct { |
| 2777 | Container struct { |
| 2778 | From struct { |
| 2779 | WithExec struct { |
| 2780 | WithWorkdir struct { |
| 2781 | WithWorkdir struct { |
| 2782 | Workdir string |
| 2783 | WithMountedDirectory struct { |
| 2784 | WithMountedTemp struct { |
| 2785 | WithMountedCache struct { |
| 2786 | Mounts []string |
| 2787 | WithExec struct { |
| 2788 | Directory struct { |
| 2789 | ID core.DirectoryID |
| 2790 | } |
| 2791 | } |
| 2792 | WithoutMount struct { |
| 2793 | Mounts []string |
| 2794 | } |
| 2795 | } |
| 2796 | } |
| 2797 | } |
| 2798 | } |
| 2799 | } |
| 2800 | } |
| 2801 | } |
| 2802 | } |
| 2803 | }](c, t, |
| 2804 | `query Test($id: ID!, $cache: ID!) { |
| 2805 | container { |
| 2806 | from(address: "`+alpineImage+`") { |
| 2807 | withExec(args: ["mkdir", "-p", "/mnt/sub"]) { |
| 2808 | withWorkdir(path: "/mnt") { |
| 2809 | withWorkdir(path: "sub") { |
| 2810 | workdir |
| 2811 | withMountedDirectory(path: "dir", source: $id) { |
nothing calls this directly
no test coverage detected