RTECO-1362 - Add e2e test template for --fail-on-missing-deps flag - #3689
Draft
udaykb2 wants to merge 2 commits into
Draft
RTECO-1362 - Add e2e test template for --fail-on-missing-deps flag#3689udaykb2 wants to merge 2 commits into
udaykb2 wants to merge 2 commits into
Conversation
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 10:53
0734bd9 to
d775bea
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 11:29
d775bea to
6e6d82c
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 11:50
6e6d82c to
9ebe248
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 12:11
9ebe248 to
240f1bd
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 12:28
240f1bd to
557816b
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 12:58
557816b to
bcc1fbc
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 14:31
bcc1fbc to
a65ac00
Compare
Add TestNpmInstallFailOnMissingDeps to verify the strict-mode flag behavior: - WITHOUT flag + missing cache: npm install succeeds (existing behavior) - WITH flag but no build-info collection: flag has no effect (succeeds) - WITH flag + build-info collection + missing cache: npm install fails (strict mode) This test is skipped in sandbox environments due to network constraints (private npm registry unreachable) but serves as a comprehensive template for manual or CI verification when network access is available. The implementation steps are documented in the test comments.
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 14:49
a65ac00 to
d2e6ee6
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 15:54
29f043a to
f5df206
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 16:07
f5df206 to
2a08ea7
Compare
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 16:32
2a08ea7 to
ee29d2f
Compare
…er strict mode error
Tests 4 & 5 were failing because cache was being rebuilt during npm install,
bypassing strict mode dependency checks. This fix implements the correct approach.
SOLUTION APPROACH:
npm cache lookup flow:
1. index-v5: metadata index (package@version → integrity)
2. GetTarball: uses integrity to find tarball in content-v2
3. When tarballs deleted + index-v5 removed:
4. npm rebuilds index-v5 (normal during install)
5. npm tries to find tarballs for checksums
6. GetTarball fails (file not found)
7. build-info detects missing dependencies
8. strict mode error triggers ✓
This matches the pattern in removeOneNpmCachedTarball() for partial cache corruption.
Keeps _cacache directory intact so GetNpmConfigCache works correctly.
Keeps node_modules so npm doesn't repopulate from registry.
Expected results:
- Test 4: All deps missing → fails with strict mode error ✓
- Test 5: Partial missing (xml only) → fails with strict mode error ✓
- Build-info NOT published in both cases ✓
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
udaykb2
force-pushed
the
RTECO-1362-npm-fail-on-missing-deps
branch
from
August 30, 2026 16:41
ee29d2f to
5712b61
Compare
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.
Add TestNpmInstallFailOnMissingDeps to verify the strict-mode flag behavior:
This test is skipped in sandbox environments due to network constraints (private npm registry unreachable) but serves as a comprehensive template for manual or CI verification when network access is available. The implementation steps are documented in the test comments.
masterbranch.go vet ./....go fmt ./....