test(org-external): integration + e2e for !external resolver (PR-B + PR-C) #106
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/external-ref-pr-bc-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Follow-up tests for molecule-core PR #105's
!externalresolver. PR-B + PR-C from the design's phasing (internal#77 comment 1995). No production code changes.PR-B (task #233): integration against local bare-git remote
org_external_integration_test.go— 3 tests using git'sinsteadOfURL rewrite (process-scoped viaGIT_CONFIG_COUNT/KEY/VALUEenv vars, no~/.gitconfigpollution):git cloneagainst a local bare-repo. Asserts cache population + content materialization + path rewrite + cache-hit on second invocation (marker file survives).gitFetcher.Fetchdirect (no resolver wrapping); verifies cache-hit returns same dir + same SHA, no clobber.Production code untouched —
insteadOfmakes the gitFetcher think it's cloning from Gitea, but git rewrites at clone time tofile://<barePath>. Tests the real shell-out + parsing without network.PR-C (task #234): live-Gitea e2e against dev-department
local_e2e_dev_dept_test.gogainsTestLocalE2E_ExternalDevDepartment— minimal parent template that uses!externalagainst the LIVEmolecule-ai/molecule-dev-departmentrepo. No symlink, no/tmp/local-e2e-deploy/fixture. Composition resolves over network at import time.Asserts:
TestLocalE2E_DevDepartmentExtraction's symlink path)Documentation Specialistpresent (under app-lead)Triage Operatorpresent (under dev-lead)files_diris cache-prefixed (proves rewrite ran)resolveInsideRoot+Statsucceeds (would fail provisioning if not)Skipped if Gitea unreachable (TCP probe to
git.moleculesai.app:443) or git binary absent.Verified locally (2026-05-08)
Coverage layers post-merge
TestResolveExternalMapping_*TestGitFetcher_*TestLocalE2E_ExternalDevDepartmentRefs
LGTM. PR-B uses GIT_CONFIG_COUNT/KEY/VALUE for process-scoped insteadOf — clean and reusable pattern. PR-C runs against live Gitea, skipped if unreachable. Together with PR-A unit tests, the resolver has unit+integration+e2e coverage.