Skip to content

Commit c1d6d31

Browse files
deribaucourtjoufellasfl
authored andcommitted
cukinia: id: rename to test_id
The `id` function has been renamed to no longer conflict with the `id` command from coreutils. The new name is `test_id` to correspond to the CSV collumn name in the test results.
1 parent 302bf49 commit c1d6d31

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ A cukinia config file supports the following statements:
8484
``[!]`` is appended to the default test description)
8585
* ``verbose``: Can prefix any test to preserve stdout/stderr
8686
* ``as <string>``: Can prefix any test to change its textual description
87-
* ``id <string>``: Can prefix any test to add a test id in the different outputs
87+
* ``test_id <string>``: Can prefix any test to add a test id in the different outputs
88+
* ``id <string>``: DEPRECATED, was replaced by `test_id` from cukinia 0.9.0
8889

8990
### Condition statements
9091

cukinia

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ cukinia_run_dir()
354354
done
355355
}
356356

357-
# id: add a test identifier to easily track it
357+
# test_id: add a test identifier to easily track it
358358
# arg1: id name
359359
# arg2..: command
360-
id()
360+
test_id()
361361
{
362362
local ret=0
363363
__test_id="$1"; shift
@@ -507,7 +507,7 @@ check_process(){
507507

508508
if [ -n "$user" ]; then
509509
# make sure $user maps to a valid user
510-
user_uid="$(/usr/bin/id -u "$user" 2>/dev/null)" # Use full path to id, because it has been defined as a cukinia function...
510+
user_uid="$(id -u "$user" 2>/dev/null)" # Use full path to id, because it has been defined as a cukinia function...
511511
fi
512512

513513
if $check_cmdline; then

tests/testcases-failure.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cukinia_process nosuchprocess
2828
cukinia_python_pkg nosuchpackage
2929
cukinia_symlink /dev/zero /dev/null
3030
cukinia_systemd_unit nosuchunit.service
31-
id "SWR_003" cukinia_cmd false
31+
test_id "SWR_003" cukinia_cmd false
3232

3333
section "tests/failures counters"
3434

tests/testcases.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ for color in red green blue cyan yellow gray purple; do
175175
done
176176

177177
section "Tests with id"
178-
id "SWR_001" cukinia_cmd true
179-
id "SWR_002" as "Running cukinia command with as and id" cukinia_cmd true
178+
test_id "SWR_001" cukinia_cmd true
179+
test_id "SWR_002" as "Running cukinia command with as and id" cukinia_cmd true
180180

181181
section "on failure retry"
182182
on failure retry 3 after 1s as "Should pass (no retries)" cukinia_cmd /bin/true

0 commit comments

Comments
 (0)