You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/07/27 15:35:07 UTC

[GitHub] [shardingsphere] terrymanu opened a new issue, #19613: Use `test_user` instead of `root` in test cases

terrymanu opened a new issue, #19613:
URL: https://github.com/apache/shardingsphere/issues/19613

   It is better to avoid use root user for test cases.
   Use minimum authority to complete test cases are good practice.
   
   The IT test cases had already create default `test_user` in each database docker container. Please use it as the test case user.
   
   The tasks are:
   
   - [ ]  Remove DockerStorageContainer.getRootUsername(), just use `getNormalUsername` method
   - [ ] Remove useRootUsername parameter in DockerStorageContainer's constructor 
   - [ ] Debug and make sure all IT test cases pass.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] terrymanu closed issue #19613: Use `test_user` instead of `root` in test cases

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #19613: Use `test_user` instead of `root` in test cases
URL: https://github.com/apache/shardingsphere/issues/19613


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] taojintianxia commented on issue #19613: Use `test_user` instead of `root` in test cases

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on issue #19613:
URL: https://github.com/apache/shardingsphere/issues/19613#issuecomment-1197604006

   start from MySQL. as mentioned on MySQL docker hub document, mysql image provided the way to define customized user like following usage :
   
   `MYSQL_USER`, `MYSQL_PASSWORD`
   These variables are optional, used in conjunction to create a new user and to set that user's password. This user will be granted superuser permissions (see above) for the database specified by the MYSQL_DATABASE variable. Both variables are required for a user to be created.
   
   Do note that there is no need to use this mechanism to create the root superuser, that user gets created by default with the password specified by the MYSQL_ROOT_PASSWORD variable.
   
   will replace mysql root user with test_user by this way.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] taojintianxia commented on issue #19613: Use `test_user` instead of `root` in test cases

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on issue #19613:
URL: https://github.com/apache/shardingsphere/issues/19613#issuecomment-1197704534

   PG also provide the way to define user
   
   POSTGRES_PASSWORD
   This environment variable is required for you to use the PostgreSQL image. It must not be empty or undefined. This environment variable sets the superuser password for PostgreSQL. The default superuser is defined by the POSTGRES_USER environment variable.
   Note 1: The PostgreSQL image sets up trust authentication locally so you may notice a password is not required when connecting from localhost (inside the same container). However, a password will be required if connecting from a different host/container.
   Note 2: This variable defines the superuser password in the PostgreSQL instance, as set by the initdb script during initial container startup. It has no effect on the PGPASSWORD environment variable that may be used by the psql client at runtime, as described at https://www.postgresql.org/docs/14/libpq-envars.html. PGPASSWORD, if used, will be specified as a separate environment variable.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] taojintianxia commented on issue #19613: Use `test_user` instead of `root` in test cases

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on issue #19613:
URL: https://github.com/apache/shardingsphere/issues/19613#issuecomment-1197806645

   seems that there is already a way to init test_user through `00-init-authority.sql`
   will Remove DockerStorageContainer.getRootUsername(), just use getNormalUsername method
   will Remove useRootUsername parameter in DockerStorageContainer's constructor


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] taojintianxia commented on issue #19613: Use `test_user` instead of `root` in test cases

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on issue #19613:
URL: https://github.com/apache/shardingsphere/issues/19613#issuecomment-1196920554

   please assign to me 


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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