mirror of
https://github.com/nushell/nushell
synced 2024-11-11 07:34:14 +00:00
attempts to allow the test to work when run as root (#5601)
This commit is contained in:
parent
a3a9571dac
commit
7c63ce15d8
1 changed files with 14 additions and 3 deletions
|
@ -259,9 +259,20 @@ fn fails_with_ls_to_dir_without_permission() {
|
||||||
chmod 000 dir_a; ls dir_a
|
chmod 000 dir_a; ls dir_a
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
assert!(actual
|
|
||||||
|
let check_not_root = nu!(
|
||||||
|
cwd: dirs.test(), pipeline(
|
||||||
|
r#"
|
||||||
|
id -u
|
||||||
|
"#
|
||||||
|
));
|
||||||
|
|
||||||
|
assert!(
|
||||||
|
actual
|
||||||
.err
|
.err
|
||||||
.contains("The permissions of 0 do not allow access for this user"));
|
.contains("The permissions of 0 do not allow access for this user")
|
||||||
|
|| check_not_root.out == "0"
|
||||||
|
);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue