Make sure the rootCA file can be read by other.
It has to grant the other read, otherwise the websocket operator can not
start correctly.
Bug: 219816461
Test: acloud-dev create
Change-Id: Ie0b28bf69b5ee718be0f6cc8ad3e4e46c3b60f5c
diff --git a/setup/mkcert_test.py b/setup/mkcert_test.py
index 98872cf..d4edc8d 100644
--- a/setup/mkcert_test.py
+++ b/setup/mkcert_test.py
@@ -35,7 +35,10 @@
self.Patch(mkcert, "UnInstall")
self.Patch(utils, "Popen")
self.Patch(shutil, "rmtree")
+ self.Patch(os, "stat", return_value=33188)
+ self.Patch(os, "chmod")
mkcert.Install()
+ os.chmod.assert_not_called()
shutil.rmtree.assert_not_called()
mkcert.UnInstall.assert_not_called()
self.assertEqual(4, utils.Popen.call_count)
@@ -43,7 +46,9 @@
self.Patch(os.path, "isdir", return_value=True)
self.Patch(os.path, "exists", return_value=True)
+ self.Patch(os, "stat", return_value=33184)
mkcert.Install()
+ os.chmod.assert_called_once()
shutil.rmtree.assert_called_once()
mkcert.UnInstall.assert_called_once()
self.assertEqual(4, utils.Popen.call_count)