test: remove password authentication from test environment

- Remove USER_PASSWORD from test environment setup
- Update comment to correctly state that password authentication is disabled

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2025-04-27 09:25:49 +08:00
parent 0d02cbb190
commit 798fc4fa72
No known key found for this signature in database

View File

@ -929,8 +929,7 @@ func TestSudoCommand(t *testing.T) {
ExposedPorts: []string{"2222/tcp"}, // Default port for this image is 2222
Env: map[string]string{
"USER_NAME": "testuser",
"USER_PASSWORD": "testpass",
"PASSWORD_ACCESS": "false", // Enable password authentication
"PASSWORD_ACCESS": "false", // Disable password authentication
"SUDO_ACCESS": "true", // Optional: grant sudo access
"PUBLIC_KEY": string(pubKey),
},