fn test_update_sshd_config_create_new()

in libazureinit/src/provision/ssh.rs [523:535]


    fn test_update_sshd_config_create_new() -> io::Result<()> {
        let temp_dir = TempDir::new().unwrap();
        let sshd_config_path = temp_dir.path().join("sshd_config");
        let ret: Result<(), io::Error> =
            update_sshd_config(sshd_config_path.to_str().unwrap());
        assert!(ret.is_ok());

        let mut updated_content = String::new();
        let mut file = File::open(&sshd_config_path).unwrap();
        file.read_to_string(&mut updated_content).unwrap();
        assert!(updated_content.contains("PasswordAuthentication yes"));
        Ok(())
    }