Feature #9286

Add unit test for test_chown in test_fileutils.rb with non-root account

Added by Vajrasky Kok about 1 year ago. Updated about 1 year ago.

[ruby-core:59281]
Status:Closed
Priority:Normal
Assignee:Vajrasky Kok

Description

Right now, there is no unit tests for test_chown except for checking whether chown is singleton or not. Hereby, I attach the patch to test the capability of chown method with non-root user account. Non-root user can change the group ownership of the file (but not the user ownership).

In separate tickets, I'll add unit test for chmod_r and chmod with root account. We do it step by step.

add_unit_test_chown_normal_user.patch Magnifier (2.67 KB) Vajrasky Kok, 12/23/2013 05:40 PM

add_unit_test_chown_normal_user.patch Magnifier (3.15 KB) Vajrasky Kok, 12/23/2013 06:32 PM

Associated revisions

Revision 44364
Added by Nobuyoshi Nakada about 1 year ago

test_fileutils.rb: tests for chown

  • test/fileutils/fileasserts.rb (assert_ownership_group): new assertion for group ownership.
  • test/fileutils/test_fileutils.rb (test_chown{,_verbose,_noop}): based on the patch by vajrasky (Vajrasky Kok) at . [Feature #9286]

Revision 44364
Added by Nobuyoshi Nakada about 1 year ago

test_fileutils.rb: tests for chown

  • test/fileutils/fileasserts.rb (assert_ownership_group): new assertion for group ownership.
  • test/fileutils/test_fileutils.rb (test_chown{,_verbose,_noop}): based on the patch by vajrasky (Vajrasky Kok) at . [Feature #9286]

History

#2 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r44364.
Vajrasky, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


test_fileutils.rb: tests for chown

  • test/fileutils/fileasserts.rb (assert_ownership_group): new assertion for group ownership.
  • test/fileutils/test_fileutils.rb (test_chown{,_verbose,_noop}): based on the patch by vajrasky (Vajrasky Kok) at . [Feature #9286]

Also available in: Atom PDF