Verify that we can use the released library in module. WARNING: this test can fail if we make a breaking change on the `telemetry` or `querybuilder` package and use that changes in the go generated files. If so, please disable that test until the release is done then re enable it.
(ctx context.Context, t *testctx.T)
| 1815 | // `querybuilder` package and use that changes in the go generated files. |
| 1816 | // If so, please disable that test until the release is done then re enable it. |
| 1817 | func (GoSuite) TestReleaseLibraryInModule(ctx context.Context, t *testctx.T) { |
| 1818 | t.Skip("broken, see line 523 of core/sdk/go_sdk.go") |
| 1819 | versions := []string{"v0.19.10", "v0.19.5"} |
| 1820 | |
| 1821 | for _, version := range versions { |
| 1822 | version := version |
| 1823 | |
| 1824 | t.Run(fmt.Sprintf("use version %s", version), func(ctx context.Context, t *testctx.T) { |
| 1825 | c := connect(ctx, t) |
| 1826 | |
| 1827 | devEngineSvc := devEngineContainerAsService(devEngineContainer(c, func(c *dagger.Container) *dagger.Container { |
| 1828 | return c. |
| 1829 | WithEnvVariable("_EXPERIMENTAL_DAGGER_VERSION", version) |
| 1830 | })) |
| 1831 | |
| 1832 | modCtr := engineClientContainer(ctx, t, c, devEngineSvc). |
| 1833 | WithEnvVariable("_EXPERIMENTAL_DAGGER_VERSION", version). |
| 1834 | WithWorkdir("/work"). |
| 1835 | With(daggerNonNestedExec("init", "--sdk=go", "--name=test", "--source=.")) |
| 1836 | |
| 1837 | goMod, err := modCtr.File("go.mod").Contents(ctx) |
| 1838 | require.NoError(t, err) |
| 1839 | require.Contains(t, goMod, fmt.Sprintf("dagger.io/dagger %s", version)) |
| 1840 | |
| 1841 | out, err := modCtr.With(daggerNonNestedExec("call", "container-echo", "--string-arg", "hello", "stdout")).Stdout(ctx) |
| 1842 | require.NoError(t, err) |
| 1843 | require.Equal(t, out, "hello\n") |
| 1844 | }) |
| 1845 | } |
| 1846 | } |
| 1847 | |
| 1848 | func (GoSuite) TestNameCase(ctx context.Context, t *testctx.T) { |
| 1849 | c := connect(ctx, t) |
nothing calls this directly
no test coverage detected