Skip to content
Snippets Groups Projects
Commit 65480734 authored by Jack Hu's avatar Jack Hu
Browse files

fixed uuid dep

parent b4c78c42
No related branches found
No related tags found
No related merge requests found
......@@ -20,11 +20,12 @@
"nice-grpc": "^2.1.7",
"path": "^0.12.7",
"typescript": "^5.3.3",
"uuidv4": "^6.2.13"
"uuid": "^9.0.1"
},
"devDependencies": {
"@types/express-ws": "^3.0.4",
"@types/lodash": "^4.14.202",
"@types/uuid": "^9.0.8",
"grpc-tools": "^1.12.4",
"ts-proto": "^1.167.2"
}
......@@ -233,9 +234,10 @@
}
},
"node_modules/@types/uuid": {
"version": "8.3.4",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz",
"integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw=="
"version": "9.0.8",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz",
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==",
"dev": true
},
"node_modules/@types/ws": {
"version": "8.5.10",
......@@ -1757,22 +1759,17 @@
}
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/uuidv4": {
"version": "6.2.13",
"resolved": "https://registry.npmjs.org/uuidv4/-/uuidv4-6.2.13.tgz",
"integrity": "sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ==",
"dependencies": {
"@types/uuid": "8.3.4",
"uuid": "8.3.2"
}
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
......
......@@ -21,11 +21,12 @@
"nice-grpc": "^2.1.7",
"path": "^0.12.7",
"typescript": "^5.3.3",
"uuidv4": "^6.2.13"
"uuid": "^9.0.1"
},
"devDependencies": {
"@types/express-ws": "^3.0.4",
"@types/lodash": "^4.14.202",
"@types/uuid": "^9.0.8",
"grpc-tools": "^1.12.4",
"ts-proto": "^1.167.2"
}
......
......@@ -4,7 +4,7 @@ import { createChannel, createClient } from 'nice-grpc';
import { Order, TestResults, UserPatchRequest } from "../types";
import { avgRuntime } from "../testing";
import constants from "../constants";
import { uuid } from "uuidv4";
import { v4 } from "uuid";
export default class GrpcTestSuite implements ITestSuite {
private channel: any;
......@@ -185,7 +185,7 @@ export default class GrpcTestSuite implements ITestSuite {
results.ordersByUser = await avgRuntime(async () => await this.testOrdersByUser(constants.TEST_USER_ID), iterations, constants.EXPECTED_ORDERSBYUSER);
results.orderById = await avgRuntime(async () => await this.testOrderById(constants.TEST_ORDER_ID), iterations, constants.EXPECTED_ORDER);
results.allUsers = await avgRuntime(async () => await this.testAllUsers(), iterations, constants.EXPECTED_USERS);
results.insertOrder = await avgRuntime(async () => await this.testInsertOrder({ id: uuid(), ...constants.TEST_ORDER }), iterations);
results.insertOrder = await avgRuntime(async () => await this.testInsertOrder({ id: v4(), ...constants.TEST_ORDER }), iterations);
results.updateUser = await avgRuntime(async () => await this.testUpdateUser(constants.TEST_UPDATE), iterations);
return results;
}
......
import { ITestSuite } from '../interfaces';
import { Category, EndpointReturn, Order, Product, TestResults, User, UserPatchRequest } from '../types';
import { avgRuntime } from '../testing';
import { uuid } from 'uuidv4';
import { v4 } from "uuid";
import constants from '../constants';
export default class RestTestSuite implements ITestSuite {
......@@ -216,7 +216,7 @@ export default class RestTestSuite implements ITestSuite {
results.ordersByUser = await avgRuntime(async () => await this.testOrdersByUser(constants.TEST_USER_ID), iterations, constants.EXPECTED_ORDERSBYUSER);
results.orderById = await avgRuntime(async () => await this.testOrderById(constants.TEST_ORDER_ID), iterations, constants.EXPECTED_ORDER);
results.allUsers = await avgRuntime(async () => await this.testAllUsers(), iterations, constants.EXPECTED_USERS);
results.insertOrder = await avgRuntime(async () => await this.testInsertOrder({ id: uuid(), ...constants.TEST_ORDER }), iterations);
results.insertOrder = await avgRuntime(async () => await this.testInsertOrder({ id: v4(), ...constants.TEST_ORDER }), iterations);
results.updateUser = await avgRuntime(async () => await this.testUpdateUser(constants.TEST_UPDATE), iterations);
return results;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment