mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-02 17:44:31 +00:00
proxmox-sys: fix regression tests
This commit is contained in:
parent
21686c99e6
commit
ec3965fdad
@ -110,7 +110,7 @@ pub fn sendmail(
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::tools::email::sendmail;
|
||||
use crate::email::sendmail;
|
||||
|
||||
#[test]
|
||||
fn email_without_recipients() {
|
||||
|
@ -36,7 +36,7 @@ pub fn io_err_other<E: ToString>(e: E) -> io::Error {
|
||||
/// # use anyhow::{bail, Error};
|
||||
/// use nix::{dir::Dir, fcntl::OFlag, sys::stat::Mode};
|
||||
///
|
||||
/// use proxmox::sys::error::SysError;
|
||||
/// use proxmox_sys::error::SysError;
|
||||
///
|
||||
/// # fn test() -> Result<(), Error> {
|
||||
///
|
||||
@ -116,7 +116,7 @@ impl SysError for nix::Error {
|
||||
/// # use std::os::unix::io::RawFd;
|
||||
/// # use anyhow::{bail, Error};
|
||||
///
|
||||
/// use proxmox::sys::error::SysResult;
|
||||
/// use proxmox_sys::error::SysResult;
|
||||
///
|
||||
/// struct MyReader(RawFd);
|
||||
///
|
||||
|
@ -37,7 +37,7 @@ pub fn create_dir<P: AsRef<Path>>(path: P, options: CreateOptions) -> Result<(),
|
||||
/// ```no_run
|
||||
/// # use nix::sys::stat::Mode;
|
||||
/// # use nix::unistd::{Gid, Uid};
|
||||
/// # use proxmox::tools::fs::{create_path, CreateOptions};
|
||||
/// # use proxmox_sys::fs::{create_path, CreateOptions};
|
||||
/// # fn code() -> Result<(), anyhow::Error> {
|
||||
/// create_path(
|
||||
/// "/var/lib/mytool/wwwdata",
|
||||
@ -160,8 +160,8 @@ fn test_create_path() {
|
||||
Some(CreateOptions::new().perm(stat::Mode::from_bits_truncate(0o755))),
|
||||
Some(
|
||||
CreateOptions::new()
|
||||
.owner(Uid::effective())
|
||||
.group(Gid::effective()),
|
||||
.owner(nix::unistd::Uid::effective())
|
||||
.group(nix::unistd::Gid::effective()),
|
||||
),
|
||||
)
|
||||
.expect("expected create_path to work");
|
||||
|
@ -23,7 +23,7 @@ ioctl_write_ptr_bad!(set_size, libc::TIOCSWINSZ, nix::pty::Winsize);
|
||||
///
|
||||
/// Example:
|
||||
/// ```
|
||||
/// # use proxmox::sys::linux::pty::*;
|
||||
/// # use proxmox_sys::linux::pty::*;
|
||||
/// # use std::process::Command;
|
||||
/// # use nix::Result;
|
||||
/// fn fork() -> Result<u64> {
|
||||
|
Loading…
Reference in New Issue
Block a user