Yingdi Yu | 4154634 | 2014-11-30 23:37:53 -0800 | [diff] [blame] | 1 | In test, we set a test-specific "HOME", which cause OS X keychain look for the |
| 2 | default keychain of a "different" user. If the default keychain does not exist, |
| 3 | all subsequent calls to OS X keychain will fail. User interaction (such as |
| 4 | specifying password) is required to create a keychain. However, user interaction |
| 5 | is not feasible in automated tests. |
| 6 | |
| 7 | This problem is caused by the OS X system assumption that one user must have a |
| 8 | login keychain, which is also the user's default keychain, because a user |
| 9 | account is always created with a login keychain as default. Thus OS X system |
| 10 | infers a user according to the HOME env, and did not expect user to change the |
| 11 | HOME env in normal use. |