Skip to content

Commit

Permalink
[TA-2736] Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LaberionAjvazi committed Jan 24, 2024
1 parent 3ce272e commit 2bc8fb7
Showing 1 changed file with 4 additions and 35 deletions.
39 changes: 4 additions & 35 deletions tests/config/config-export.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,30 +71,11 @@ describe("Config export", () => {

it("Should export variables file with connection variables fixed", async () => {
const firstPackageDependencies = new Map<string, DependencyTransport[]>();
firstPackageDependencies.set("1.0.0", [
{
key: "firstDep",
version: "1.1.1"
},
{
key: "secondDep",
version: "2.3.4"
}
]);
firstPackageDependencies.set("1.0.0", []);

const secondPackageDependencies = new Map<string, DependencyTransport[]>();
secondPackageDependencies.set("1.0.0", [
{
key: "firstDep",
version: "1.1.1",
}
]);
secondPackageDependencies.set("1.1.1", [
{
key: "secondDep",
version: "2.3.5"
}
]);
secondPackageDependencies.set("1.0.0", []);
secondPackageDependencies.set("1.1.1", []);

const manifest: PackageManifestTransport[] = [];
manifest.push(ConfigUtils.buildManifestForKeyAndFlavor("key-1", "STUDIO", firstPackageDependencies));
Expand Down Expand Up @@ -218,7 +199,7 @@ describe("Config export", () => {

const variableExportRequest = parse(mockedPostRequestBodyByUrl.get("https://myTeam.celonis.cloud/package-manager/api/core/packages/export/batch/variables-with-assignments"));
expect(variableExportRequest).toBeTruthy();
expect(variableExportRequest).toHaveLength(6);
expect(variableExportRequest).toHaveLength(3);
expect(variableExportRequest).toContainEqual({
packageKey: "key-1",
version: "1.0.0"
Expand All @@ -231,18 +212,6 @@ describe("Config export", () => {
packageKey: "key-2",
version: "1.1.1"
});
expect(variableExportRequest).toContainEqual({
packageKey: "firstDep",
version: "1.1.1"
});
expect(variableExportRequest).toContainEqual({
packageKey: "secondDep",
version: "2.3.4"
});
expect(variableExportRequest).toContainEqual({
packageKey: "secondDep",
version: "2.3.5"
});
})

it("Should remove SCENARIO asset files of packages", async () => {
Expand Down

0 comments on commit 2bc8fb7

Please sign in to comment.