示例#1
0
    def test_refresh_refresh_features_by_id(self):
        """@Test: Refresh smart proxy features, search for proxy by id

        @Feature: Smart Proxy

        @Assert: Proxy features are refreshed
        """
        proxy = make_proxy()
        Proxy.refresh_features({u'id': proxy['id']})
示例#2
0
    def test_proxy_refresh_features_by_name(self):
        """@Test: Refresh smart proxy features, search for proxy by name

        @Feature: Smart Proxy

        @Assert: Proxy features are refreshed
        """
        proxy = make_proxy()
        Proxy.refresh_features({u'name': proxy['name']})
示例#3
0
    def test_positive_refresh_features_by_id(self):
        """Refresh smart proxy features, search for proxy by id

        @Feature: Smart Proxy

        @Assert: Proxy features are refreshed
        """
        proxy = make_proxy()
        # parse the port number so we can reopen the SSH tunnel
        port_regexp = re.search(u':([0-9]+)', proxy['url'])
        if port_regexp:
            port = port_regexp.group(1)
            with default_url_on_new_port(9090, port):
                Proxy.refresh_features({u'id': proxy['id']})
        else:
            raise ValueError('Unable to parse port number from proxy URL')
示例#4
0
    def test_positive_refresh_features_by_name(self):
        """Refresh smart proxy features, search for proxy by name

        :id: 2ddd0097-8f65-430e-963d-a3b5dcffe86b

        :expectedresults: Proxy features are refreshed

        :CaseLevel: Integration
        """
        # Since we want to run multiple commands against our fake capsule, we
        # need the tunnel kept open in order not to allow different concurrent
        # test to claim it. Thus we want to manage the tunnel manually.

        # get an available port for our fake capsule
        port = get_available_capsule_port()
        with default_url_on_new_port(9090, port) as url:
            proxy = self._make_proxy({u'url': url})
            Proxy.refresh_features({u'id': proxy['name']})
示例#5
0
    def test_positive_refresh_features_by_id(self):
        """Refresh smart proxy features, search for proxy by id

        :id: d3db63ce-b877-40eb-a863-294c12489ddd

        :expectedresults: Proxy features are refreshed

        :CaseLevel: Integration
        """
        # Since we want to run multiple commands against our fake capsule, we
        # need the tunnel kept open in order not to allow different concurrent
        # test to claim it. Thus we want to manage the tunnel manually.

        # get an available port for our fake capsule
        port = get_available_capsule_port()
        with default_url_on_new_port(9090, port) as url:
            proxy = self._make_proxy({u'url': url})
            Proxy.refresh_features({u'id': proxy['id']})
示例#6
0
    def test_positive_refresh_features_by_name(self):
        """Refresh smart proxy features, search for proxy by name

        :id: 2ddd0097-8f65-430e-963d-a3b5dcffe86b

        :expectedresults: Proxy features are refreshed

        :CaseLevel: Integration
        """
        # Since we want to run multiple commands against our fake capsule, we
        # need the tunnel kept open in order not to allow different concurrent
        # test to claim it. Thus we want to manage the tunnel manually.

        # get an available port for our fake capsule
        port = get_available_capsule_port()
        with default_url_on_new_port(9090, port) as url:
            proxy = self._make_proxy({u'url': url})
            Proxy.refresh_features({u'id': proxy['name']})
示例#7
0
    def test_positive_refresh_features_by_id(self):
        """Refresh smart proxy features, search for proxy by id

        :id: d3db63ce-b877-40eb-a863-294c12489ddd

        :expectedresults: Proxy features are refreshed

        :CaseLevel: Integration
        """
        # Since we want to run multiple commands against our fake capsule, we
        # need the tunnel kept open in order not to allow different concurrent
        # test to claim it. Thus we want to manage the tunnel manually.

        # get an available port for our fake capsule
        port = get_available_capsule_port()
        with default_url_on_new_port(9090, port) as url:
            proxy = self._make_proxy({u'url': url})
            Proxy.refresh_features({u'id': proxy['id']})
示例#8
0
    def test_positive_refresh_features_by_name(self):
        """Refresh smart proxy features, search for proxy by name

        @id: 2ddd0097-8f65-430e-963d-a3b5dcffe86b

        @Assert: Proxy features are refreshed

        @CaseLevel: Integration
        """
        # Since we want to run multiple commands against our fake capsule, we
        # need the tunnel kept open in order not to allow different concurrent
        # test to claim it. Thus we want to manage the tunnel manually.

        # get an available port for our fake capsule
        port = get_available_capsule_port()
        with default_url_on_new_port(9090, port):
            url = u'https://{0}:{1}'.format(settings.server.hostname, port)
            proxy = make_proxy({u'url': url})
            Proxy.refresh_features({u'id': proxy['name']})
        # Add capsule id to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
示例#9
0
    def test_positive_refresh_features_by_name(self):
        """Refresh smart proxy features, search for proxy by name

        @id: 2ddd0097-8f65-430e-963d-a3b5dcffe86b

        @Assert: Proxy features are refreshed

        @CaseLevel: Integration
        """
        # Since we want to run multiple commands against our fake capsule, we
        # need the tunnel kept open in order not to allow different concurrent
        # test to claim it. Thus we want to manage the tunnel manually.

        # get an available port for our fake capsule
        port = get_available_capsule_port()
        with default_url_on_new_port(9090, port):
            url = u'https://{0}:{1}'.format(settings.server.hostname, port)
            proxy = make_proxy({u'url': url})
            Proxy.refresh_features({u'id': proxy['name']})
        # Add capsule id to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
示例#10
0
    def test_positive_refresh_features_by_id(self):
        """Refresh smart proxy features, search for proxy by id

        :id: d3db63ce-b877-40eb-a863-294c12489ddd

        :expectedresults: Proxy features are refreshed

        :CaseLevel: Integration
        """
        # Since we want to run multiple commands against our fake capsule, we
        # need the tunnel kept open in order not to allow different concurrent
        # test to claim it. Thus we want to manage the tunnel manually.

        # get an available port for our fake capsule
        port = get_available_capsule_port()
        with default_url_on_new_port(9090, port):
            url = u'https://{0}:{1}'.format(settings.server.hostname, port)
            proxy = make_proxy({u'url': url})
            Proxy.refresh_features({u'id': proxy['id']})
        # Add capsule id to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
示例#11
0
    def test_positive_refresh_features_by_id(self):
        """Refresh smart proxy features, search for proxy by id

        :id: d3db63ce-b877-40eb-a863-294c12489ddd

        :expectedresults: Proxy features are refreshed

        :CaseLevel: Integration
        """
        # Since we want to run multiple commands against our fake capsule, we
        # need the tunnel kept open in order not to allow different concurrent
        # test to claim it. Thus we want to manage the tunnel manually.

        # get an available port for our fake capsule
        port = get_available_capsule_port()
        with default_url_on_new_port(9090, port):
            url = u'https://{0}:{1}'.format(settings.server.hostname, port)
            proxy = make_proxy({u'url': url})
            Proxy.refresh_features({u'id': proxy['id']})
        # Add capsule id to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
示例#12
0
    def test_proxy_refresh_features_by_name(self):
        """@Test: Refresh smart proxy features, search for proxy by name

        @Feature: Smart Proxy

        @Assert: Proxy features are refreshed

        """
        try:
            proxy = make_proxy()
        except CLIFactoryError as err:
            self.fail(err)
        result = Proxy.refresh_features({u'name': proxy['name']})
        self.assertEqual(result.return_code, 0)