mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-21 20:15:21 +00:00
tests: Move Clear Linux cloud-init files to subdirectory
And rename the default user from "admin" to "cloud" as the admin user clashes with a standard user and group name on Ubuntu. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
98d7955e34
commit
be199e5560
10
src/main.rs
10
src/main.rs
@ -263,7 +263,12 @@ mod tests {
|
||||
let cloudinit_file_path =
|
||||
String::from(self.tmp_dir.path().join("cloudinit").to_str().unwrap());
|
||||
|
||||
let cloud_init_directory = self.tmp_dir.path().join("cloud-init").join("openstack");
|
||||
let cloud_init_directory = self
|
||||
.tmp_dir
|
||||
.path()
|
||||
.join("cloud-init")
|
||||
.join("clear")
|
||||
.join("openstack");
|
||||
|
||||
fs::create_dir_all(&cloud_init_directory.join("latest"))
|
||||
.expect("Expect creating cloud-init directory to succeed");
|
||||
@ -272,6 +277,7 @@ mod tests {
|
||||
.unwrap()
|
||||
.join("test_data")
|
||||
.join("cloud-init")
|
||||
.join("clear")
|
||||
.join("openstack")
|
||||
.join("latest");
|
||||
|
||||
@ -370,7 +376,7 @@ mod tests {
|
||||
let mut sess = Session::new().unwrap();
|
||||
sess.handshake(&tcp).map_err(|_| Error::Connection)?;
|
||||
|
||||
sess.userauth_password("admin", "cloud123")
|
||||
sess.userauth_password("cloud", "cloud123")
|
||||
.map_err(|_| Error::Authentication)?;
|
||||
assert!(sess.authenticated());
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#cloud-config
|
||||
users:
|
||||
- name: admin
|
||||
- name: cloud
|
||||
passwd: $6$7125787751a8d18a$sHwGySomUA1PawiNFWVCKYQN.Ec.Wzz0JtPPL1MvzFrkwmop2dq7.4CYf03A5oemPQ4pOFCCrtCelvFBEle/K.
|
||||
sudo:
|
||||
- ALL=(ALL) NOPASSWD:ALL
|
Loading…
x
Reference in New Issue
Block a user