blob: f77cf65870c722cfc9fadf10f15ad46bef7a5da4 [file] [log] [blame]
Davide Pesavento534b8412018-12-08 19:19:09 -05001In tests, we set a test-specific HOME, which causes macOS Keychain to look for
2the default keychain of a "different" user. If the default keychain does not
3exist, all subsequent calls to macOS Keychain will fail. User interaction
4(such as entering the password) is required to create a keychain. However,
5user interaction is not feasible in automated tests.
6
7This problem is caused by macOS's assumption that a user must have a login
8keychain, which is also the user's default keychain, because a user account is
9always created with a login keychain by default. Thus, macOS infers the user
10according to the HOME env, and does not expect the user to change the HOME env
11during normal use.