Project

General

Profile

Actions

Feature #9286

closed

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

Added by vajrasky (Vajrasky Kok) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:59281]

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.


Files

add_unit_test_chown_normal_user.patch (2.67 KB) add_unit_test_chown_normal_user.patch vajrasky (Vajrasky Kok), 12/23/2013 05:40 PM
add_unit_test_chown_normal_user.patch (3.15 KB) add_unit_test_chown_normal_user.patch vajrasky (Vajrasky Kok), 12/23/2013 06:32 PM
Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 9 years 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
    [ruby-core:59281]. [Feature #9286]
Actions

Also available in: Atom PDF

Like0
Like0Like0