Exemplo n.º 1
0
 def test_redirect_option(self):
     """Configure if redirects are followed for the check."""
     with self.assert_remote_call('GET',
                                  'http://example.com/',
                                  allow_redirects=True,
                                  timeout=5):
         cloudping.ping({'allow_redirects': "True"}, AWSContext())
Exemplo n.º 2
0
 def test_timeout_option(self):
     """Configure timeout for the check."""
     with self.assert_remote_call('GET',
                                  'http://example.com/',
                                  allow_redirects=False,
                                  timeout=10):
         cloudping.ping({'timeout': 10}, AWSContext())
Exemplo n.º 3
0
 def test_method_option(self):
     """Configure the HTTP method to check."""
     with self.assert_remote_call('POST',
                                  'http://example.com/',
                                  allow_redirects=False,
                                  timeout=5):
         cloudping.ping({'method': 'POST'}, AWSContext())
Exemplo n.º 4
0
 def test_protocol_option(self):
     """Configure the protocol to check."""
     with self.assert_remote_call('GET',
                                  'https://example.com/',
                                  allow_redirects=False,
                                  timeout=5):
         cloudping.ping({'protocol': 'https'}, AWSContext())
Exemplo n.º 5
0
 def test_path_option(self):
     """Configure the path to check."""
     with self.assert_remote_call('GET',
                                  'http://example.com/test/',
                                  allow_redirects=False,
                                  timeout=5):
         cloudping.ping({'path': '/test/'}, AWSContext())
Exemplo n.º 6
0
 def test_domain_option(self):
     """Configure the domain to check."""
     with self.assert_remote_call('GET',
                                  'http://test.example.com/',
                                  allow_redirects=False,
                                  timeout=5):
         cloudping.ping({'domain': 'test.example.com'}, AWSContext())
Exemplo n.º 7
0
 def test_ping_default(self):
     """Default settings to ping a site."""
     with self.assert_remote_call('GET',
                                  'http://example.com/',
                                  allow_redirects=False,
                                  timeout=5):
         cloudping.ping({}, AWSContext())
Exemplo n.º 8
0
 def test_timeout_option(self):
     """Configure timeout for the check."""
     with self.assert_remote_call("GET", "http://example.com/", allow_redirects=False, timeout=10):
         cloudping.ping({"timeout": 10}, AWSContext())
Exemplo n.º 9
0
 def test_redirect_option(self):
     """Configure if redirects are followed for the check."""
     with self.assert_remote_call("GET", "http://example.com/", allow_redirects=True, timeout=5):
         cloudping.ping({"allow_redirects": True}, AWSContext())
Exemplo n.º 10
0
 def test_method_option(self):
     """Configure the HTTP method to check."""
     with self.assert_remote_call("POST", "http://example.com/", allow_redirects=False, timeout=5):
         cloudping.ping({"method": "POST"}, AWSContext())
Exemplo n.º 11
0
 def test_protocol_option(self):
     """Configure the protocol to check."""
     with self.assert_remote_call("GET", "https://example.com/", allow_redirects=False, timeout=5):
         cloudping.ping({"protocol": "https"}, AWSContext())
Exemplo n.º 12
0
 def test_path_option(self):
     """Configure the path to check."""
     with self.assert_remote_call("GET", "http://example.com/test/", allow_redirects=False, timeout=5):
         cloudping.ping({"path": "/test/"}, AWSContext())
Exemplo n.º 13
0
 def test_domain_option(self):
     """Configure the domain to check."""
     with self.assert_remote_call("GET", "http://test.example.com/", allow_redirects=False, timeout=5):
         cloudping.ping({"domain": "test.example.com"}, AWSContext())
Exemplo n.º 14
0
 def test_ping_default(self):
     """Default settings to ping a site."""
     with self.assert_remote_call("GET", "http://example.com/", allow_redirects=False, timeout=5):
         cloudping.ping({}, AWSContext())