Skip to content

Commit 3d9ab47

Browse files
test: the credential providers record is not a local edit to pull
In the older layout the record sits in resources/<org>/, and until it is committed git shows it as untracked. Pull leaves the engine's own files out of what it counts as a person's edits, and the record is on that list because migrate moves it. This pins it with a pull in a fresh clone. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
1 parent c3da13d commit 3d9ab47

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎tests/state-records-third-round.test.ts‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import { fileURLToPath } from "node:url";
2323
// engine keeps files of its own in that folder, and none of them is a
2424
// person's edit:
2525
//
26-
// resources/<org>/.vapi-org.json shown as deleted between migrate and its commit
26+
// resources/<org>/.vapi-org.json shown as deleted between migrate and its commit
27+
// resources/<org>/.vapi-credential-providers.json written by every pull
2728
//
2829
// If pull counted one as a local edit, the keep rule would be off and pull
2930
// would overwrite the committed change with the platform's copy.
@@ -181,6 +182,18 @@ test("older layout: an org pin the engine wrote, not committed yet, is not a loc
181182
assert.equal(kept, true, "pull overwrote the merged change");
182183
});
183184

185+
test("older layout: a credential providers record the engine wrote, not committed yet, is not a local edit", async () => {
186+
// The first pull after upgrading leaves this file untracked.
187+
const kept = await pullKeepsMerged(freshClone("root"), (root) =>
188+
put(
189+
root,
190+
"resources/dev/.vapi-credential-providers.json",
191+
'{\n "crm-api": {\n "provider": "webhook"\n }\n}\n',
192+
),
193+
);
194+
assert.equal(kept, true, "pull overwrote the merged change");
195+
});
196+
184197
test("unchanged: a person's own uncommitted file in that folder still switches the keep rule off", async () => {
185198
// Only the engine's files are left out. Anything else under
186199
// resources/<org>/ counts as before, .vapi-ignore included.

0 commit comments

Comments
 (0)