Repository navigation
test: port polyfill e2e checks from sdk-sdk - #3
Merged
Merged
Conversation
The polyfill module moved here from dagger/sdk-sdk, but its e2e coverage stayed behind. Bring over the checks from sdk-sdk's polyfill-e2e module and merge them into this repo's e2e module. Checks are grouped by the polyfill type they cover, one type per file, and hang off E2E as nested objects so they surface as e-2-e:<group>:<check>. Shared assertions and fixture paths live in utils.dang. The ported checks keep the injected Workspace argument: forks, changesets, and generation address fixtures from the workspace root. The findConfigDirs checks keep their synthetic workspace, since discovery is anchored at the caller cwd and each case needs a different one. Add a .dagger-dang-sdk-skip-generate marker at the fixture root. The Dang SDK's generateAll scans the whole workspace for dagger.json files declaring sdk.source "dang", so without it the new fixtures are treated as real modules and codegen fails on update/dep-local, which has no .dang files. Signed-off-by: Tom Chauveau <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The polyfill module moved here from dagger/sdk-sdk, but its e2e coverage stayed behind in
sdk-sdk'spolyfill-e2emodule. This brings those checks over and merges them with thefindConfigDirschecks already here.Layout
Checks are grouped by the polyfill type they cover, one type per file, hanging off
E2Eas nested objects so they surface ase-2-e:<group>:<check>:Notes
ws: Workspace!— forks, changesets, and generation address fixtures from the workspace root. ThefindConfigDirschecks keep their syntheticasWorkspace(cwd:)workspace, since discovery is anchored at the caller cwd and each case needs a different one..dagger-dang-sdk-skip-generateat the fixture root is required. The Dang SDK'sgenerateAllscans the whole workspace fordagger.jsonfiles declaringsdk.source: "dang", so without the marker the new fixtures are treated as real modules and codegen fails onupdate/dep-local, which has no.dangfiles. One marker at the fixture root covers every group viafindUp— same conventiondang-sdkuses for its own fixtures.Assertsand are called statically, likePolyfillWorkspaceSnapshotin the polyfill source.assertContains/assertNotContainsbecamestringContains/stringNotContainsto avoid reading as the assertion form ofAsserts.contains(list membership).Test
dagger --x-release=v1.0.0-beta.7 check→ 14 passed, clean working tree.