Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(978)

Unified Diff: client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py

Issue 3525003: Refactor platform_CryptohomeTestAuth + add testcase (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: fix site_cryptohome Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py
diff --git a/client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py b/client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py
index 8072ae04e61d109b8e85cda252adaf8ba59762cb..95445d18edc79aa62dc1278f9c4973f946ac4955 100644
--- a/client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py
+++ b/client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py
@@ -2,8 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import os
+from autotest_lib.client.bin import chromeos_constants
+from autotest_lib.client.bin import site_cryptohome, site_login, site_ui_test
-from autotest_lib.client.bin import site_login, site_ui_test
+
+TEST_USER = 'cryptohome_test@chromium.org'
+TEST_PASS = 'testme'
+TEST_FILE = os.path.join(chromeos_constants.CRYPTOHOME_MOUNT_PT, 'hello')
class login_CryptohomeMounted(site_ui_test.UITest):
@@ -11,3 +17,10 @@ class login_CryptohomeMounted(site_ui_test.UITest):
def run_once(self):
site_login.wait_for_cryptohome()
+ site_login.attempt_logout()
+ site_cryptohome.remove_vault(TEST_USER)
+ site_cryptohome.mount_vault(TEST_USER, TEST_PASS, create=True)
+ open(TEST_FILE, 'w').close()
+ self.login()
+ site_login.wait_for_cryptohome()
+ self.assert_(not os.path.exists(TEST_FILE))
« no previous file with comments | « client/bin/site_cryptohome.py ('k') | client/site_tests/platform_CryptohomeTestAuth/platform_CryptohomeTestAuth.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698