Ejemplo n.º 1
0
	def test_existing_user_with_correct_password_works(self):
		version1 = ProxySQLBaseTest.run_query_mysql(
								"SELECT @@version_comment LIMIT 1", "test",
								return_result=True,
								username="******", password="******")

		version2 = ProxySQLBaseTest.run_query_proxysql(
								"SELECT @@version_comment LIMIT 1", "test",
								return_result=True,
								username="******", password="******")

		self.assertEqual(version1, version2)
Ejemplo n.º 2
0
	def test_select_strings_returns_correct_result(self):

		rows = ProxySQLBaseTest.run_query_proxysql("SELECT * FROM strings", "test")
		self.assertEqual(set([row[0] for row in rows]),
						 set(['a', 'ab', 'abc', 'abcd']))
Ejemplo n.º 3
0
    def test_select_strings_returns_correct_result(self):

        rows = ProxySQLBaseTest.run_query_proxysql("SELECT * FROM strings",
                                                   "test")
        self.assertEqual(set([row[0] for row in rows]),
                         set(['a', 'ab', 'abc', 'abcd']))
Ejemplo n.º 4
0
	def test_inexisting_user_with_random_password_does_not_work(self):
		version = ProxySQLBaseTest.run_query_proxysql(
								"SELECT @@version_comment LIMIT 1", "test",
								return_result=True,
								username="******", password="******")
Ejemplo n.º 5
0
	def test_existing_user_with_incorrect_password_does_not_work(self):
		version = ProxySQLBaseTest.run_query_proxysql(
								"SELECT @@version_comment LIMIT 1", "test",
								return_result=True,
								username="******", password="******")
Ejemplo n.º 6
0
	def test_existing_user_with_correct_password_but_not_registerd_within_proxysql_does_not_work(self):
		version1 = ProxySQLBaseTest.run_query_proxysql(
								"SELECT @@version_comment LIMIT 1", "test",
								return_result=True,
								username="******", password="******")