Beispiel #1
0
    def test_if_request_is_sent_to_the_current_marathon_leader(
            self, master_ar_process, superuser_user_header):

        generic_correct_upstream_dest_test(master_ar_process,
                                           superuser_user_header,
                                           '/system/v1/leader/marathon/foo/bar',
                                           'http://127.0.0.2:80',
                                           )
Beispiel #2
0
    def test_if_request_is_sent_to_correct_upstream(self, master_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(
            master_ar_process,
            superuser_user_header,
            agent_prefix + "/foo/bar",
            'http://127.0.0.2:15001',
        )
Beispiel #3
0
    def test_if_request_is_sent_to_correct_upstream(self, master_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(
            master_ar_process,
            superuser_user_header,
            '/exhibitor/some/path',
            'http://127.0.0.1:8181',
        )
Beispiel #4
0
    def test_if_request_is_sent_to_the_current_marathon_leader(
            self, master_ar_process, superuser_user_header):

        generic_correct_upstream_dest_test(
            master_ar_process,
            superuser_user_header,
            '/system/v1/leader/marathon/foo/bar',
            'http://127.0.0.2:80',
        )
Beispiel #5
0
    def test_if_request_is_sent_to_correct_upstream(self, master_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(
            master_ar_process,
            superuser_user_header,
            '/system/v1/logs/v1/foo/bar',
            'http:///run/dcos/dcos-log.sock',
        )
Beispiel #6
0
    def test_if_request_is_sent_to_correct_upstream(self,
                                                    agent_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(agent_ar_process,
                                           superuser_user_header,
                                           '/system/v1/logs/v1/foo/bar',
                                           'http:///run/dcos/dcos-log.sock',
                                           )
Beispiel #7
0
    def test_if_request_is_sent_to_correct_upstream(self,
                                                    master_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(master_ar_process,
                                           superuser_user_header,
                                           agent_prefix + "/foo/bar",
                                           'http://127.0.0.2:15001',
                                           )
Beispiel #8
0
    def test_if_request_is_sent_to_correct_upstream(self,
                                                    master_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(master_ar_process,
                                           superuser_user_header,
                                           '/exhibitor/some/path',
                                           'http://127.0.0.1:8181',
                                           )
Beispiel #9
0
    def test_if_request_is_sent_to_correct_upstream(self,
                                                    master_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(master_ar_process,
                                           superuser_user_header,
                                           '/system/v1/metrics/foo/bar',
                                           'http:///run/dcos/dcos-metrics-master.sock',
                                           )
Beispiel #10
0
    def test_if_request_is_sent_to_correct_upstream(self,
                                                    master_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(master_ar_process,
                                           superuser_user_header,
                                           '/system/health/v1/foo/bar',
                                           'http://127.0.0.1:1050',
                                           )
Beispiel #11
0
    def test_if_request_is_sent_to_correct_upstream(self,
                                                    master_ar_process,
                                                    superuser_user_header):

        generic_correct_upstream_dest_test(master_ar_process,
                                           superuser_user_header,
                                           '/system/health/v1/foo/bar',
                                           'http://127.0.0.1:1050',
                                           )
Beispiel #12
0
    def test_if_request_is_sent_to_the_current_mesos_leader(
            self, master_ar_process, superuser_user_header):

        # FIXME: using MesosDNS `leader.mesos` alias makes things hard to test.
        # Dropping in in favour of cache+API call would improve reliability as
        # well. So no "changing the leader and testing results tests for now"
        generic_correct_upstream_dest_test(
            master_ar_process,
            superuser_user_header,
            '/system/v1/leader/mesos/foo/bar',
            'http://127.0.0.2:80',
        )
Beispiel #13
0
    def test_if_request_is_sent_to_the_current_mesos_leader(self,
                                                            master_ar_process,
                                                            superuser_user_header):

        # FIXME: using MesosDNS `leader.mesos` alias makes things hard to test.
        # Dropping in in favour of cache+API call would improve reliability as
        # well. So no "changing the leader and testing results tests for now"
        generic_correct_upstream_dest_test(master_ar_process,
                                           superuser_user_header,
                                           '/system/v1/leader/mesos/foo/bar',
                                           'http://127.0.0.2:80',
                                           )
Beispiel #14
0
    def test_if_request_is_sent_to_correct_upstream(self, master_ar_process,
                                                    superuser_user_header,
                                                    agent, endpoint, prefix):

        # FIXME - these are very simple tests for now, need to think how to test
        # streaming api better. ATM we only test if HTTP is set to 1.1 for streaming
        # stuff.
        uri_path = '/system/v1/agent/{}{}'.format(agent, prefix)
        generic_correct_upstream_dest_test(
            master_ar_process,
            superuser_user_header,
            uri_path,
            endpoint,
        )
Beispiel #15
0
    def test_if_request_is_sent_to_correct_upstream(self,
                                                    master_ar_process,
                                                    superuser_user_header,
                                                    agent,
                                                    endpoint,
                                                    prefix):

        # FIXME - these are very simple tests for now, need to think how to test
        # streaming api better. ATM we only test if HTTP is set to 1.1 for streaming
        # stuff.
        uri_path = '/system/v1/agent/{}{}'.format(agent, prefix)
        generic_correct_upstream_dest_test(master_ar_process,
                                           superuser_user_header,
                                           uri_path,
                                           endpoint,
                                           )