@@ -423,6 +423,28 @@ def test_splunk_uid_gid(self):
423423 if cid :
424424 self .client .remove_container (cid , v = True , force = True )
425425
426+ def test_splunk_uid_gid (self ):
427+ cid = None
428+ try :
429+ # Run container
430+ cid = self .client .create_container (self .SPLUNK_IMAGE_NAME , tty = True , command = "no-provision" )
431+ cid = cid .get ("Id" )
432+ self .client .start (cid )
433+ # Wait a bit
434+ time .sleep (5 )
435+ # If the container is still running, we should be able to exec inside
436+ # Check that the git SHA exists in /opt/ansible
437+ exec_command = self .client .exec_create (cid , "id" , user = "splunk" )
438+ std_out = self .client .exec_start (exec_command )
439+ assert "uid=41812" in std_out
440+ assert "gid=41812" in std_out
441+ except Exception as e :
442+ self .logger .error (e )
443+ raise e
444+ finally :
445+ if cid :
446+ self .client .remove_container (cid , v = True , force = True )
447+
426448 def test_uf_entrypoint_help (self ):
427449 # Run container
428450 cid = self .client .create_container (self .UF_IMAGE_NAME , tty = True , command = "help" )
@@ -506,6 +528,28 @@ def test_uf_uid_gid(self):
506528 if cid :
507529 self .client .remove_container (cid , v = True , force = True )
508530
531+ def test_uf_uid_gid (self ):
532+ cid = None
533+ try :
534+ # Run container
535+ cid = self .client .create_container (self .UF_IMAGE_NAME , tty = True , command = "no-provision" )
536+ cid = cid .get ("Id" )
537+ self .client .start (cid )
538+ # Wait a bit
539+ time .sleep (5 )
540+ # If the container is still running, we should be able to exec inside
541+ # Check that the git SHA exists in /opt/ansible
542+ exec_command = self .client .exec_create (cid , "id" , user = "splunk" )
543+ std_out = self .client .exec_start (exec_command )
544+ assert "uid=41812" in std_out
545+ assert "gid=41812" in std_out
546+ except Exception as e :
547+ self .logger .error (e )
548+ raise e
549+ finally :
550+ if cid :
551+ self .client .remove_container (cid , v = True , force = True )
552+
509553 def test_adhoc_1so_using_default_yml (self ):
510554 # Generate default.yml
511555 cid = self .client .create_container (self .SPLUNK_IMAGE_NAME , tty = True , command = "create-defaults" )
0 commit comments