Context
Recent batch-push work (GitHub's pushBatch/deleteBatch switched to GraphQL createCommitOnBranch) was validated with mocked requestUrl only until manual live verification against a real repository. Real provider testing caught issues that mocks cannot detect:
- actual API request/response shape;
- HTTP status and provider-specific error behavior;
- GraphQL mutation failures returned as HTTP 200 with
errors[];
- real commit/tree history behavior.
This repository supports three providers (GitHubService, GitLabService, GiteaService) with different API implementations. The goal is to create a reliable real-provider contract test process without over-coupling to provider internals.
Goal
Create a repeatable real-provider E2E harness that verifies production service code against real GitHub, GitLab, and Gitea environments.
The first PR should focus on provider contract verification, not a full CI testing platform.
Scope (v1)
E2E test foundation
Provider smoke scenarios
Shared scenarios (GitHub / GitLab / Gitea)
GitHub additional scenarios
Move / rename verification
Independent verification
Tests must not only call the service under test to prove success.
Add provider-level verification helpers to check:
- branch head changes;
- commit history;
- file tree state;
- blob content;
- symlink mode where applicable.
SyncManager integration (limited v1)
Do not include full Obsidian UI automation in the first PR.
Before adding SyncManager E2E:
Initial SyncManager coverage:
Defer:
- conflict resolution UI;
- full pushAll/pullAll flows;
- rename UI flows;
- symlink UI flows.
Environment strategy
Local/manual
- GitHub: disposable sandbox repository + fine-grained token.
- GitLab: disposable project + project access token.
- Gitea: pinned Docker image with runtime provisioning.
CI (future / limited)
Initial PR should avoid making GitHub/GitLab secrets required for every PR.
Recommended progression:
- local/manual execution;
- workflow_dispatch with protected secrets;
- optional required checks after stability is proven.
Gitea provisioning
Deferred follow-ups
- full CI release gating;
- scheduled API drift checks;
- large batch stress tests;
- binary file matrix;
- provider outage simulation;
- complete SyncManager E2E coverage.
Non-goals
- Not retroactively re-testing old changes.
- Not storing provider credentials in repository secrets for the first implementation.
- Not replacing existing mocked unit tests.
Implementation plan
Single branch / single PR:
branch: test/real-provider-e2e
Suggested order:
- E2E infrastructure + credential handling
- GitHub smoke suite (highest risk due GraphQL path)
- GitLab smoke suite
- Gitea container suite
- Independent verification helpers
- Minimal SyncManager integration (only if interaction boundary is ready)
- Documentation
Context
Recent batch-push work (GitHub's
pushBatch/deleteBatchswitched to GraphQLcreateCommitOnBranch) was validated with mockedrequestUrlonly until manual live verification against a real repository. Real provider testing caught issues that mocks cannot detect:errors[];This repository supports three providers (
GitHubService,GitLabService,GiteaService) with different API implementations. The goal is to create a reliable real-provider contract test process without over-coupling to provider internals.Goal
Create a repeatable real-provider E2E harness that verifies production service code against real GitHub, GitLab, and Gitea environments.
The first PR should focus on provider contract verification, not a full CI testing platform.
Scope (v1)
E2E test foundation
e2e/vitest.e2e.config.tsobsidiansetup;obsidianshim for E2E onlyrequestUrlbacked by realfetch;BaseGitService.safeRequest();--provider, credential loading, and test filtering.Provider smoke scenarios
Shared scenarios (GitHub / GitLab / Gitea)
testConnectionpushFilecreategetFilepushFileupdatepushBatchdeleteFiledeleteBatchlistFilesDetailedgetBlobGitHub additional scenarios
errors[]handling verificationmode 120000)Move / rename verification
commitBatchbehaviorIndependent verification
Tests must not only call the service under test to prove success.
Add provider-level verification helpers to check:
SyncManager integration (limited v1)
Do not include full Obsidian UI automation in the first PR.
Before adding SyncManager E2E:
Initial SyncManager coverage:
Defer:
Environment strategy
Local/manual
CI (future / limited)
Initial PR should avoid making GitHub/GitLab secrets required for every PR.
Recommended progression:
Gitea provisioning
Deferred follow-ups
Non-goals
Implementation plan
Single branch / single PR:
Suggested order: