Skip to content

Commit cde41fc

Browse files
committed
fix(V2): discover home-owned prerequisites in XLSX live tests
The XLSX live test discovered prerequisite IDs (program, methodology, issuance, label, etc.) from an unfiltered list and used the first row. With governance sync enabled, that first row can be a synced non-home record, so the test's projects/units referenced a foreign parent and the ownership guard rejected the round-trip re-import. Scope prerequisite discovery to the home org (orgUid=me) so created test records reference home-owned parents.
1 parent 0baec07 commit cde41fc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/v2/live-api/xlsx-import-export.live.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ describe('XLSX Import/Export Live API Tests', function () {
9898
const maxAttempts = 3;
9999
const pkField = PK_FIELDS[type];
100100
try {
101-
const response = await request.get(`/v2/${type}`).query({ page: 1, limit: 10 });
101+
// Scope to home-org-owned prerequisites: with governance sync enabled,
102+
// an unfiltered list can return a synced non-home record, which would
103+
// make the test's projects/units reference a foreign parent and trip the
104+
// ownership guard on re-import.
105+
const response = await request.get(`/v2/${type}`).query({ page: 1, limit: 10, orgUid: 'me' });
102106
if (response.status !== 200) {
103107
console.error(` [attempt ${attempt}] GET /v2/${type} returned status ${response.status}: ${JSON.stringify(response.body)}`);
104108
if (attempt < maxAttempts) {

0 commit comments

Comments
 (0)