Skip to content

Commit 6a5cee3

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 b6393d7 commit 6a5cee3

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
@@ -24,7 +24,8 @@ import { fileURLToPath } from "node:url";
2424
// engine keeps files of its own in that folder, and none of them is a
2525
// person's edit:
2626
//
27-
// resources/<org>/.vapi-org.json shown as deleted between migrate and its commit
27+
// resources/<org>/.vapi-org.json shown as deleted between migrate and its commit
28+
// resources/<org>/.vapi-credential-providers.json written by every pull
2829
//
2930
// If pull counted one as a local edit, the keep rule would be off and pull
3031
// would overwrite the committed change with the platform's copy.
@@ -182,6 +183,18 @@ test("older layout: an org pin the engine wrote, not committed yet, is not a loc
182183
assert.equal(kept, true, "pull overwrote the merged change");
183184
});
184185

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

0 commit comments

Comments
 (0)