github-code-scanning[bot] commented on code in PR #7497:
URL: https://github.com/apache/trafficcontrol/pull/7497#discussion_r1187537604


##########
experimental/traffic-portal/nightwatch/dataClient.ts:
##########
@@ -0,0 +1,419 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import * as https from "https";
+
+import axios, { AxiosError, AxiosInstance } from "axios";
+import { CreatedData } from "nightwatch/globals/globals";
+import {
+       CDN,
+       GeoLimit,
+       GeoProvider,
+       LoginRequest,
+       ProfileType,
+       Protocol,
+       RequestASN,
+       RequestCacheGroup,
+       RequestCoordinate,
+       RequestDeliveryService,
+       RequestDivision,
+       RequestPhysicalLocation,
+       RequestProfile,
+       RequestRegion, RequestServer, RequestStatus,
+       RequestSteeringTarget,
+       RequestTenant,
+       RequestType,
+       ResponseCacheGroup,
+       ResponseDeliveryService,
+       ResponseDivision,
+       ResponsePhysicalLocation, ResponseProfile,
+       ResponseRegion, ResponseStatus,
+       TypeFromResponse
+} from "trafficops-types";
+
+/**
+ * Defines the class used to create test data for the E2E environment
+ */
+export class DataClient {
+       private readonly toURL: string;
+       private readonly apiVersion: string;
+       private readonly adminUser: string;
+       private readonly adminPass: string;
+       /** Tracks if the client has logged in */
+       public loggedIn = false;
+       /** Client used to talk to the TO API */
+       private readonly client: AxiosInstance;
+       public constructor(toURL: string, apiVersion: string, adminUser: 
string, adminPass: string) {
+               this.toURL = toURL;
+               this.apiVersion = apiVersion;
+               this.adminUser = adminUser;
+               this.adminPass = adminPass;
+
+               this.client = axios.create({
+                       httpsAgent: new https.Agent({
+                               rejectUnauthorized: false

Review Comment:
   ## Disabling certificate validation
   
   Disabling certificate validation is strongly discouraged.
   
   [Show more 
details](https://github.com/apache/trafficcontrol/security/code-scanning/266)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to