[ARVADOS] updated: f2afe64c25d1b3e79b38972e69104431a2587935

git at public.curoverse.com git at public.curoverse.com
Wed Aug 26 15:01:50 EDT 2015


Summary of changes:
 services/login-sync/test/test_add_user.rb | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

       via  f2afe64c25d1b3e79b38972e69104431a2587935 (commit)
      from  cf2d5c1b966cae7d5023ff482891c4ea7e767de4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit f2afe64c25d1b3e79b38972e69104431a2587935
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 26 15:01:27 2015 -0400

    6781: Pass tests regardless of whether an admin group exists on the test host. refs #6871

diff --git a/services/login-sync/test/test_add_user.rb b/services/login-sync/test/test_add_user.rb
index c7d92b7..7a010c2 100644
--- a/services/login-sync/test/test_add_user.rb
+++ b/services/login-sync/test/test_add_user.rb
@@ -12,15 +12,20 @@ class TestAddUser < Minitest::Test
     invoke_sync binstubs: ['new_user']
     spied = File.read(@tmpdir+'/spy')
     assert_match %r{useradd -m -c active -s /bin/bash -G fuse active}, spied
-    assert_match %r{useradd -m -c adminroot -s /bin/bash -G docker,fuse adminroot}, spied
+    # BUG(TC): This assertion succeeds only if docker and fuse groups
+    # exist on the host, but is insensitive to the admin group (groups
+    # are quietly ignored by login-sync if they don't exist on the
+    # current host).
+    assert_match %r{useradd -m -c adminroot -s /bin/bash -G docker(,admin)?,fuse adminroot}, spied
   end
 
   def test_useradd_success
-    # binstub_new_user/useradd will exit non-zero because its args
-    # won't match any line in this empty file:
+    # binstub_new_user/useradd will succeed.
     File.open(@tmpdir+'/succeed', 'w') do |f|
       f.puts 'useradd -m -c active -s /bin/bash -G fuse active'
+      # Accept either form; see note about groups in test_useradd_error.
       f.puts 'useradd -m -c adminroot -s /bin/bash -G docker,fuse adminroot'
+      f.puts 'useradd -m -c adminroot -s /bin/bash -G docker,admin,fuse adminroot'
     end
     $stderr.puts "*** Expect crash in dir_s_mkdir:"
     invoke_sync binstubs: ['new_user']

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list