Example #1
0
 def setUp(self):
     test_base.BaseTest.setUp(self)
     self.get_envoy_info()
     self.session = RemoteRunner(client='ssh',
                                 host=self.envoyctl_host,
                                 username=self.envoyctl_host_user,
                                 port="22",
                                 password=self.envoyctl_host_password)
 def _get_special_label_in_log(self, cmd):
     results = []
     for host in self.productpage_hosts:
         session = RemoteRunner(client='ssh',
                                host=host,
                                username=self.productpage_user,
                                port="22",
                                password=self.productpage_password)
         result = session.run(cmd)
         results.append(result.stdout)
     return results
Example #3
0
class ProxyConfigTest(test_base.BaseTest):
    @classmethod
    def setUpClass(cls):
        logging.debug('suite begin')

    @classmethod
    def tearDownClass(cls):
        logging.debug('suite end')

    def setUp(self):
        test_base.BaseTest.setUp(self)
        self.get_envoy_info()
        self.session = RemoteRunner(client='ssh',
                                    host=self.envoyctl_host,
                                    username=self.envoyctl_host_user,
                                    port="22",
                                    password=self.envoyctl_host_password)
        self.proxy_address = self.proxy_address

    def tearDown(self):
        pass

    def test_get_proxy_config(self):
        cmd = "envoyctl proxy-config serverinfo %s" % self.proxy_address
        result = self.session.run(cmd)

        print(result)
        self.assertTrue(result.exit_status == 0,
                        "Execute envoyctl proxy-config fail.")
Example #4
0
class ProxyListTest(test_base.BaseTest):
    @classmethod
    def setUpClass(cls):
        logging.debug('suite begin')

    @classmethod
    def tearDownClass(cls):
        logging.debug('suite end')

    def setUp(self):
        test_base.BaseTest.setUp(self)
        self.get_envoy_info()
        self.session = RemoteRunner(client='ssh',
                                    host=self.envoyctl_host,
                                    username=self.envoyctl_host_user,
                                    port="22",
                                    password=self.envoyctl_host_password)

    def tearDown(self):
        pass

    def test_list_proxy_servers(self):
        cmd = "envoyctl proxy-list"
        result = self.session.run(cmd)

        print(result)
        self.assertTrue(result.exit_status == 0,
                        "Execute envoyctl proxy-list fail.")

    def test_list_proxy_servers_details(self):
        cmd = "envoyctl proxy-list -d"
        result = self.session.run(cmd)

        print(result)
        self.assertTrue(result.exit_status == 0,
                        "Execute envoyctl proxy-list details fail.")
Example #5
0
class PilotConfigTest(test_base.BaseTest):
    @classmethod
    def setUpClass(cls):
        logging.debug('suite begin')

    @classmethod
    def tearDownClass(cls):
        logging.debug('suite end')

    def setUp(self):
        test_base.BaseTest.setUp(self)
        self.get_envoy_info()
        self.session = RemoteRunner(client='ssh',
                                    host=self.envoyctl_host,
                                    username=self.envoyctl_host_user,
                                    port="22",
                                    password=self.envoyctl_host_password)
        self.proxy_server_list = self.proxy_server_list
        self.port = self.proxy_server_port

    def tearDown(self):
        pass

    def test_create_pilot_config(self):
        proxy_list = ''
        for ip in self.proxy_server_list:
            proxy_list += ' ' + ip + (":%s" % self.port)

        cmd = "envoyctl pilot-config " + proxy_list
        print(cmd)

        result = self.session.run(cmd)

        print(result)
        self.assertTrue(result.exit_status == 0,
                        "Execute envoyctl pilot-config fail.")