mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tests/refactor ~ use is_ci()
for CI host platform testing
This commit is contained in:
parent
407d455b12
commit
d144182add
4 changed files with 9 additions and 24 deletions
|
@ -7,10 +7,7 @@ fn test_groups() {
|
|||
let result = ucmd.run();
|
||||
println!("result.stdout {}", result.stdout);
|
||||
println!("result.stderr = {}", result.stderr);
|
||||
if env::var("USER").is_ok()
|
||||
&& env::var("USER").unwrap() == "runner"
|
||||
&& result.stdout.trim().is_empty()
|
||||
{
|
||||
if is_ci() && result.stdout.trim().is_empty() {
|
||||
// In the CI, some server are failing to return the group.
|
||||
// As seems to be a configuration issue, ignoring it
|
||||
return;
|
||||
|
@ -26,7 +23,7 @@ fn test_groups_arg() {
|
|||
println!("result.stdout {}", result.stdout);
|
||||
println!("result.stderr = {}", result.stderr);
|
||||
let s1 = String::from(result.stdout.trim());
|
||||
if s1.parse::<f64>().is_ok() {
|
||||
if is_ci() && s1.parse::<f64>().is_ok() {
|
||||
// In the CI, some server are failing to return id -un.
|
||||
// So, if we are getting a uid, just skip this test
|
||||
// As seems to be a configuration issue, ignoring it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue