You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/08/26 18:03:11 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #6139: Fix roles hard code for TP integration test

ocket8888 commented on a change in pull request #6139:
URL: https://github.com/apache/trafficcontrol/pull/6139#discussion_r696861788



##########
File path: traffic_portal/test/integration/CommonUtils/API.ts
##########
@@ -259,9 +259,11 @@ export class API {
             return null;
         }
         for (const request of data.getRequest) {
-            const query = `?${encodeURIComponent(request.queryKey)}=${encodeURIComponent(request.queryValue)}${randomize}`;
+            let query = `?${encodeURIComponent(request.queryKey)}=${encodeURIComponent(request.queryValue)}${randomize}`;
+            if (`?${encodeURIComponent(request.queryKey)}` === 'admin' || `?${encodeURIComponent(request.queryKey)}` === 'operations' || `?${encodeURIComponent(request.queryKey)}` === 'read-only'){

Review comment:
       this will never evaluate to `true`, because all of your template strings start with `?` and none of the Role names start with `?`




-- 
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: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org