Skip to content

Commit eb08e73

Browse files
committed
chore: fix
1 parent ca49826 commit eb08e73

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

scripts/cts/testServer/replaceAllObjectsWithTransformation.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const raowtState: Record<
1212
copyCount: number;
1313
deleteCount: number;
1414
pushCount: number;
15-
getEventCount: number;
1615
tmpIndexName: string;
1716
waitTaskCount: number;
1817
waitingForFinalWaitTask: boolean;
@@ -43,7 +42,6 @@ function addRoutes(app: Express): void {
4342
raowtState[lang] = {
4443
copyCount: 0,
4544
pushCount: 0,
46-
getEventCount: 0,
4745
deleteCount: 1,
4846
waitTaskCount: 0,
4947
tmpIndexName: req.params.indexName,
@@ -71,7 +69,6 @@ function addRoutes(app: Express): void {
7169
raowtState[lang] = {
7270
copyCount: 1,
7371
pushCount: 0,
74-
getEventCount: 0,
7572
deleteCount: 0,
7673
waitTaskCount: 0,
7774
tmpIndexName: req.body.destination,
@@ -88,11 +85,11 @@ function addRoutes(app: Express): void {
8885
case 'move': {
8986
const lang = req.body.destination.replace('cts_e2e_replace_all_objects_with_transformation_', '');
9087
expect(raowtState).to.include.keys(lang);
88+
console.log(raowtState[lang]);
9189
expect(raowtState[lang]).to.deep.equal({
9290
copyCount: 2,
9391
pushCount: 10,
9492
deleteCount: 0,
95-
getEventCount: 6,
9693
waitTaskCount: 2,
9794
tmpIndexName: req.params.indexName,
9895
waitingForFinalWaitTask: false,
@@ -125,18 +122,14 @@ function addRoutes(app: Express): void {
125122
raowtState[lang].pushCount += req.body.records.length;
126123

127124
res.json({
128-
runID: `b1b7a982-524c-40d2-bb7f-48aab075abda_${lang}`,
125+
runID: `b1b7a982-524c-40d2-bb7f-48aab075abda`,
129126
eventID: `113b2068-6337-4c85-b5c2-e7b213d8292${raowtState[lang].pushCount}`,
130127
message: 'OK',
131128
createdAt: '2022-05-12T06:24:30.049Z',
132129
});
133130
});
134131

135132
app.get('/1/runs/:runID/events/:eventID', (req, res) => {
136-
const lang = req.params.runID.match(/^b1b7a982-524c-40d2-bb7f-48aab075abda_(.*)$/)?.[1] as string;
137-
138-
raowtState[lang].getEventCount++;
139-
140133
res.json({
141134
status: 'succeeded',
142135
eventID: req.params.eventID,
@@ -160,7 +153,6 @@ function addRoutes(app: Express): void {
160153
expect(raowtState[lang]).to.deep.equal({
161154
copyCount: 2,
162155
pushCount: 10,
163-
getEventCount: 6,
164156
deleteCount: 0,
165157
waitTaskCount: 3,
166158
tmpIndexName: req.params.indexName,

tests/CTS/client/search/replaceAllObjectsWithTransformation.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,25 @@
7474
},
7575
"watchResponses": [
7676
{
77-
"runID": "b1b7a982-524c-40d2-bb7f-48aab075abda_${{language}}",
77+
"runID": "b1b7a982-524c-40d2-bb7f-48aab075abda",
7878
"eventID": "113b2068-6337-4c85-b5c2-e7b213d82923",
7979
"message": "OK",
8080
"createdAt": "2022-05-12T06:24:30.049Z"
8181
},
8282
{
83-
"runID": "b1b7a982-524c-40d2-bb7f-48aab075abda_${{language}}",
83+
"runID": "b1b7a982-524c-40d2-bb7f-48aab075abda",
8484
"eventID": "113b2068-6337-4c85-b5c2-e7b213d82926",
8585
"message": "OK",
8686
"createdAt": "2022-05-12T06:24:30.049Z"
8787
},
8888
{
89-
"runID": "b1b7a982-524c-40d2-bb7f-48aab075abda_${{language}}",
89+
"runID": "b1b7a982-524c-40d2-bb7f-48aab075abda",
9090
"eventID": "113b2068-6337-4c85-b5c2-e7b213d82929",
9191
"message": "OK",
9292
"createdAt": "2022-05-12T06:24:30.049Z"
9393
},
9494
{
95-
"runID": "b1b7a982-524c-40d2-bb7f-48aab075abda_${{language}}",
95+
"runID": "b1b7a982-524c-40d2-bb7f-48aab075abda",
9696
"eventID": "113b2068-6337-4c85-b5c2-e7b213d829210",
9797
"message": "OK",
9898
"createdAt": "2022-05-12T06:24:30.049Z"

0 commit comments

Comments
 (0)