swap to dedicated @coe-mirror-bot for Matrix sends
Replaces shared @intel-bot credentials with a Matrix user created specifically for this tool. Reads Infisical keys via constants COE_MIRROR_BOT_USER_KEY and COE_MIRROR_BOT_PASSWORD_KEY so test assertions track the code rather than hardcoded strings.
This commit is contained in:
@@ -701,9 +701,9 @@ class TestMatrixTokenRefreshOn401:
|
||||
fake_result_pass.stdout = "test_pass"
|
||||
|
||||
def mock_subprocess_run(cmd, **kwargs):
|
||||
if cmd[2] == "MATRIX_USER":
|
||||
if cmd[2] == coe_mirror.COE_MIRROR_BOT_USER_KEY:
|
||||
return fake_result_user
|
||||
elif cmd[2] == "MATRIX_PASSWORD":
|
||||
elif cmd[2] == coe_mirror.COE_MIRROR_BOT_PASSWORD_KEY:
|
||||
return fake_result_pass
|
||||
return MagicMock(returncode=1, stdout="")
|
||||
|
||||
@@ -794,9 +794,9 @@ class TestMatrixLoginWritesCacheChmod600:
|
||||
fake_result_pass.stdout = "testpass"
|
||||
|
||||
def mock_subprocess_run(cmd, **kwargs):
|
||||
if cmd[2] == "MATRIX_USER":
|
||||
if cmd[2] == coe_mirror.COE_MIRROR_BOT_USER_KEY:
|
||||
return fake_result_user
|
||||
elif cmd[2] == "MATRIX_PASSWORD":
|
||||
elif cmd[2] == coe_mirror.COE_MIRROR_BOT_PASSWORD_KEY:
|
||||
return fake_result_pass
|
||||
return MagicMock(returncode=1, stdout="")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user