Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())