Skip to content

Commit ca50795

Browse files
committed
Fixed formatting.
Signed-off-by: Vilem Obratil <[email protected]>
1 parent f4d2f6b commit ca50795

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

e2e/tests/api/dependencies/global.setup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ setup.describe("Ingest initial data", () => {
2727
logger.info("Setup: upload finished successfully");
2828
});
2929
});
30-

e2e/tests/api/features/performance-delete.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { deleteSboms } from "../helpers/delete";
44
import { writeRequestDurationToFile } from "../helpers/report";
55
import { uploadSboms } from "../helpers/upload";
66

7-
test.describe.configure({ mode: 'serial' });
7+
test.describe.configure({ mode: "serial" });
88

99
const SBOM_DIR = "../features/assets/performance/delete"; // The path is relative to the helpers/upload.ts file.
1010
const SBOM_FILES = [
@@ -35,7 +35,6 @@ let sbomIds: string[] = [];
3535
const REPORT_FILE_PREFIX = "report-perf-delete-";
3636

3737
test.describe("Performance / Deletion", { tag: "@performance" }, () => {
38-
3938
test.beforeEach(async ({ axios }) => {
4039
logger.info("Uploading SBOMs before deletion performance tests.");
4140

@@ -116,4 +115,4 @@ test.describe("Performance / Deletion", { tag: "@performance" }, () => {
116115

117116
sbomIds = [];
118117
});
119-
})
118+
});

e2e/tests/api/helpers/upload.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { AxiosInstance } from "axios";
66
export async function uploadSboms(
77
axios: AxiosInstance,
88
sbomDirPath: string,
9-
files: string[]
9+
files: string[],
1010
) {
1111
const uploads = files.map((e) => {
1212
const filePath = path.join(__dirname, `${sbomDirPath}/${e}`);
@@ -16,25 +16,27 @@ export async function uploadSboms(
1616
return axios.post("/api/v2/sbom", fileStream, {
1717
headers: { "Content-Type": "application/json+bzip2" },
1818
});
19-
2019
});
2120

2221
const responses = await Promise.all(uploads);
23-
return responses
22+
return responses;
2423
}
2524

26-
export async function uploadAdvisories(axios: AxiosInstance, advisoryDirPath: string, files: string[]) {
27-
25+
export async function uploadAdvisories(
26+
axios: AxiosInstance,
27+
advisoryDirPath: string,
28+
files: string[],
29+
) {
2830
const uploads = files.map((e) => {
29-
const filePath = path.join(__dirname, `${advisoryDirPath}/${e}`);
30-
fs.statSync(filePath); // Verify file exists
31-
32-
const fileStream = fs.createReadStream(filePath);
33-
return axios.post("/api/v2/advisory", fileStream, {
34-
headers: { "Content-Type": "application/json+bzip2" },
35-
});
31+
const filePath = path.join(__dirname, `${advisoryDirPath}/${e}`);
32+
fs.statSync(filePath); // Verify file exists
33+
34+
const fileStream = fs.createReadStream(filePath);
35+
return axios.post("/api/v2/advisory", fileStream, {
36+
headers: { "Content-Type": "application/json+bzip2" },
3637
});
38+
});
3739

38-
const responses = await Promise.all(uploads)
39-
return responses
40+
const responses = await Promise.all(uploads);
41+
return responses;
4042
}

0 commit comments

Comments
 (0)