Ejemplo n.º 1
0
 def test_socketfile_failure_http(self):
     self.fs.CreateFile('/tmp/http',
                        contents='',
                        st_mode=(stat.S_IFSOCK | 0o000))
     args = ('--status', 'running', '--connection', 'http://127.0.0.1')
     result = check_docker.process_args(args=args)
     self.assertFalse(
         check_docker.socketfile_permissions_failure(parsed_args=result))
Ejemplo n.º 2
0
 def test_socketfile_failure_unreadable(self):
     self.fs.CreateFile('/tmp/unreadable',
                        contents='',
                        st_mode=(stat.S_IFSOCK | 0o000))
     args = ('--status', 'running', '--connection', '/tmp/unreadable')
     result = check_docker.process_args(args=args)
     self.assertTrue(
         check_docker.socketfile_permissions_failure(parsed_args=result))
Ejemplo n.º 3
0
 def test_socketfile_failure_missing(self):
     args = ('--status', 'running', '--connection', '/tmp/missing')
     result = check_docker.process_args(args=args)
     self.assertTrue(
         check_docker.socketfile_permissions_failure(parsed_args=result))
Ejemplo n.º 4
0
 def test_socketfile_failure_filetype(self):
     self.fs.CreateFile('/tmp/not_socket', contents='testing')
     args = ('--status', 'running', '--connection', '/tmp/not_socket')
     result = check_docker.process_args(args=args)
     self.assertTrue(
         check_docker.socketfile_permissions_failure(parsed_args=result))