zrhoffman commented on code in PR #7328:
URL: https://github.com/apache/trafficcontrol/pull/7328#discussion_r1093448937


##########
.github/actions/tp-integration-tests/entrypoint.sh:
##########
@@ -58,9 +58,15 @@ import _postinstall
 print(_postinstall.hash_pass('${to_admin_password}'))
 PYTHON_COMMANDS
 )"
+admin_role_id="$(<<QUERY psql -t
+SELECT r.id
+FROM public."role" r
+WHERE r."name" = 'admin'
+QUERY
+)"
 <<QUERY psql
 INSERT INTO tm_user (username, role, tenant_id, local_passwd)
-  VALUES ('${to_admin_username}', 1, 1,
+  VALUES ('${to_admin_username}', ${admin_role_id}, 1,

Review Comment:
   `username` is `TEXT` type, which heeds quotes, but `role` is `INT8` type and 
does not need quotes. That said, #7328 gets the `role` ID in a subquery as of 
03dcb34d05, so quotes around the subquery would not allowed regardless.



-- 
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