robertmu commented on code in PR #20:
URL: 
https://github.com/apache/cloudberry-gpbackup/pull/20#discussion_r2302692309


##########
integration/metadata_globals_queries_test.go:
##########
@@ -344,6 +344,16 @@ CREATEEXTTABLE (protocol='gphdfs', type='writable')`
 
                        for _, role := range results {
                                if role.Name == "role1" {
+                                       if connectionPool.Version.IsCBDB() {
+                                               // Cloudberry uses 
SCRAM-SHA-256 by default, while the test was
+                                               // written expecting an MD5 
hash. The exact SCRAM hash is
+                                               // unpredictable due to 
salting, so we only check its prefix.
+                                               
Expect(role.Password).To(HavePrefix("SCRAM-SHA-256$"))

Review Comment:
   Thank you for the thoughtful review and the suggestion to extract the salt 
value and compute the hash. This is technically feasible and shows good 
attention to detail.
   
   While it's possible to extract the salt and recompute the SCRAM hash, I 
believe this exceeds the responsibility scope of this integration test. Our 
test goal is to verify that the `GetRoles()` function correctly extracts and 
maps role information from the database, not to verify PostgreSQL's SCRAM 
algorithm implementation.
   
   The current format validation is sufficient to ensure:
   1. Data is correctly extracted  
   2. SCRAM format is properly recognized
   
   Re-implementing the SCRAM algorithm would add unnecessary complexity and 
maintenance burden with limited benefit.



-- 
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: commits-unsubscr...@cloudberry.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org
For additional commands, e-mail: commits-h...@cloudberry.apache.org

Reply via email to