This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new a00bc7241d Updated package lock and cleaned TPv2-e2e file (#8012)
a00bc7241d is described below

commit a00bc7241dde181967bc4b8f2a5fb016801f4c39
Author: Rima Shah <[email protected]>
AuthorDate: Wed May 22 16:18:00 2024 -0600

    Updated package lock and cleaned TPv2-e2e file (#8012)
    
    * Updated package-lock and remove =d nightwatch from tpv2-e2e/run.sh
    
    * Updated build/package-lock
    
    * Updated tpv2 dev dockerfile
    
    * Fix tslint errors in cypress.config.ts
    
    * Use TPv2 host for TO URL
    
    * Updated cypress config
    
    ---------
    
    Co-authored-by: Zach Hoffman <[email protected]>
---
 dev/tpv2/Dockerfile                                               | 2 +-
 experimental/traffic-portal/build/package-lock.json               | 2 +-
 experimental/traffic-portal/cypress.config.ts                     | 8 +++++---
 experimental/traffic-portal/package-lock.json                     | 8 ++++----
 .../cdn-in-a-box/optional/traffic_portal_v2_e2e_test/run.sh       | 5 +++--
 5 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/dev/tpv2/Dockerfile b/dev/tpv2/Dockerfile
index e4a8be7e96..19276e39d8 100644
--- a/dev/tpv2/Dockerfile
+++ b/dev/tpv2/Dockerfile
@@ -23,7 +23,7 @@ RUN openssl genrsa -passout pass:x -out server.pass.key 2048 
&& \
        openssl rand 32 | base64 > /aes.key && \
     chmod 644 /server.key /aes.key
 
-FROM node:16-alpine AS tpv2-dev
+FROM node:20-alpine AS tpv2-dev
 
 ENV TC="/go/src/github.com/apache/trafficcontrol"
 VOLUME $TC
diff --git a/experimental/traffic-portal/build/package-lock.json 
b/experimental/traffic-portal/build/package-lock.json
index 4925c9c562..de51a861e7 100644
--- a/experimental/traffic-portal/build/package-lock.json
+++ b/experimental/traffic-portal/build/package-lock.json
@@ -12,7 +12,7 @@
         "pm2": "^5.3.1"
       },
       "engines": {
-        "node": ">=20.11.0"
+        "node": ">=20.0.0"
       }
     },
     "node_modules/@opencensus/core": {
diff --git a/experimental/traffic-portal/cypress.config.ts 
b/experimental/traffic-portal/cypress.config.ts
index 98182a620e..bc67f32574 100644
--- a/experimental/traffic-portal/cypress.config.ts
+++ b/experimental/traffic-portal/cypress.config.ts
@@ -14,7 +14,7 @@
 import { promises as fs } from "fs";
 import * as https from "https";
 
-import axios, { type AxiosError } from "axios";
+import axios, { AxiosError } from "axios";
 import { defineConfig } from "cypress";
 import type {
        CDN,
@@ -49,6 +49,8 @@ import type {
 
 import type { CreatedData } from "./cypress/support/testing.data";
 
+import PluginEvents = Cypress.PluginEvents;
+
 /**
  * Creates mock data needed for E2E testing.
  *
@@ -363,7 +365,7 @@ async function createData(toURL: string, apiVersion: 
string, adminUser: string,
                data.role = resp.data.response;
        } catch (e) {
                const ae = e as AxiosError;
-               ae.message = `Request (${ae.config.method}) failed to ${url}`;
+               ae.message = `Request (${ae.config?.method}) failed to ${url}`;
                ae.message += ae.response ? ` with response code 
${ae.response.status}` : " with no response";
                throw ae;
        }
@@ -389,7 +391,7 @@ export default defineConfig({
        },
        e2e: {
                baseUrl: "http://localhost:4200";,
-               setupNodeEvents(on) {
+               setupNodeEvents(on: PluginEvents) {
                        on("before:run", async () => {
                                const toConfig: TOConfig = JSON.parse(await 
fs.readFile("cypress/fixtures/to.config.json", {encoding: "utf-8"}));
                                const data = await createData(toConfig.toURL, 
toConfig.apiVersion, toConfig.adminUser, toConfig.adminPass);
diff --git a/experimental/traffic-portal/package-lock.json 
b/experimental/traffic-portal/package-lock.json
index a0882e69c0..41e39f3f4e 100644
--- a/experimental/traffic-portal/package-lock.json
+++ b/experimental/traffic-portal/package-lock.json
@@ -74,7 +74,7 @@
         "typescript": "^4.9.5"
       },
       "engines": {
-        "node": ">=18.0.0"
+        "node": ">=20.0.0"
       },
       "optionalDependencies": {
         "@compodoc/compodoc": "^1.1.18"
@@ -11514,9 +11514,9 @@
       "integrity": 
"sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
     },
     "node_modules/ejs": {
-      "version": "3.1.10",
-      "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz";,
-      "integrity": 
"sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==",
+      "version": "3.1.9",
+      "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz";,
+      "integrity": 
"sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==",
       "dev": true,
       "dependencies": {
         "jake": "^10.8.5"
diff --git 
a/infrastructure/cdn-in-a-box/optional/traffic_portal_v2_e2e_test/run.sh 
b/infrastructure/cdn-in-a-box/optional/traffic_portal_v2_e2e_test/run.sh
index 4739044bf6..b56393e9b1 100755
--- a/infrastructure/cdn-in-a-box/optional/traffic_portal_v2_e2e_test/run.sh
+++ b/infrastructure/cdn-in-a-box/optional/traffic_portal_v2_e2e_test/run.sh
@@ -44,8 +44,9 @@ TMOUT
 
 cd /lang/traffic-portal
 
-jq --arg TPURL $TP_URL --arg TOURL https://$TO_FQDN:$TO_PORT '.tp_url = $TPURL 
| .to_url = $TOURL | .disableColors = true | .retryAssertionTimeoutMS = 10000 | 
.waitForConditionTimeoutMS = 10000' \
-       nightwatch/config.json > config.tmp.json && mv config.tmp.json 
nightwatch/config.json
+config=cypress/fixtures/to.config.json
+echo "$(<"$config" jq --arg TPURL $TP_URL --arg TOURL 
https://$TO_FQDN:$TO_PORT '.toURL = $TPURL')" > "$config"
+sync
 
 npm run e2e:ci
 rc=$?

Reply via email to