forked from baron/baron-sso
테넌트 import 규칙 개선
This commit is contained in:
@@ -150,6 +150,27 @@ describe("tenantCsvImport", () => {
|
||||
expect(csv).not.toContain("local-tenant-id");
|
||||
});
|
||||
|
||||
|
||||
it("preserves source tenant_id when a create resolution does not override it", () => {
|
||||
const exportedTenantId = "11111111-2222-4333-8444-555555555555";
|
||||
const rows = parseTenantCSV(
|
||||
`tenant_id,name,type,parent_tenant_id,parent_tenant_slug,slug,memo,email_domain
|
||||
${exportedTenantId},Tenant With UUID,COMPANY,,,tenant-with-uuid,Memo,tenant-with-uuid.example.com
|
||||
`,
|
||||
);
|
||||
const preview = buildTenantImportPreview(rows, tenants);
|
||||
const csv = serializeTenantImportCSV(preview, {
|
||||
2: {
|
||||
mode: "create",
|
||||
slug: "tenant-with-uuid",
|
||||
},
|
||||
});
|
||||
|
||||
expect(csv).toContain(
|
||||
`${exportedTenantId},Tenant With UUID,COMPANY,,,tenant-with-uuid,Memo,tenant-with-uuid.example.com`,
|
||||
);
|
||||
});
|
||||
|
||||
it("remaps child parent_tenant_id from source ids to selected staging ids", () => {
|
||||
const rows = parseTenantCSV(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user