mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Initial support for PG 10.0, per #2214
This commit is contained in:
@@ -11,22 +11,22 @@ ALTER SEQUENCE {{ conn|qtIdent(o_data.schema, data.name) }}
|
||||
OWNER TO {{ conn|qtIdent(data.seqowner) }};
|
||||
|
||||
{% endif %}
|
||||
{% if data.current_value %}
|
||||
{% if data.current_value is defined %}
|
||||
{% set seqname = conn|qtIdent(o_data.schema, data.name) %}
|
||||
SELECT setval({{ seqname|qtLiteral }}, {{ data.current_value }}, true);
|
||||
|
||||
{% endif %}
|
||||
{% set defquery = '' %}
|
||||
{% if data.increment %}
|
||||
{% if data.increment is defined %}
|
||||
{% set defquery = defquery+'\n INCREMENT '+data.increment|string %}
|
||||
{% endif %}
|
||||
{% if data.minimum %}
|
||||
{% if data.minimum is defined %}
|
||||
{% set defquery = defquery+'\n MINVALUE '+data.minimum|string %}
|
||||
{% endif %}
|
||||
{% if data.maximum %}
|
||||
{% if data.maximum is defined %}
|
||||
{% set defquery = defquery+'\n MAXVALUE '+data.maximum|string %}
|
||||
{% endif %}
|
||||
{% if data.cache %}
|
||||
{% if data.cache is defined %}
|
||||
{% set defquery = defquery+'\n CACHE '+data.cache|string %}
|
||||
{% endif %}
|
||||
{% if data.cycled == True %}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
import os
|
||||
|
||||
from pgadmin.utils.route import BaseTestGenerator
|
||||
from regression.python_test_utils import test_utils
|
||||
|
||||
|
||||
class TestCheckRecovery(BaseTestGenerator):
|
||||
|
||||
versions_to_test = ["default", "9.0_plus"]
|
||||
|
||||
scenarios = [
|
||||
("Test for check recovery", dict())
|
||||
]
|
||||
|
||||
def runTest(self):
|
||||
|
||||
cursor = test_utils.get_db_connection(self.server['db'],
|
||||
self.server['username'],
|
||||
self.server['db_password'],
|
||||
self.server['host'],
|
||||
self.server['port']).cursor()
|
||||
|
||||
for version in self.versions_to_test:
|
||||
template_file = os.path.join(os.path.dirname(__file__), "..", version, "check_recovery.sql")
|
||||
|
||||
cursor.execute(open(template_file, 'r').read())
|
||||
fetch_result = cursor.fetchall()
|
||||
|
||||
first_row = {}
|
||||
for index, description in enumerate(cursor.description):
|
||||
first_row[description.name] = fetch_result[0][index]
|
||||
|
||||
in_recovery = first_row['inrecovery']
|
||||
wal_paused = first_row['isreplaypaused']
|
||||
|
||||
self.assertEqual(False, in_recovery)
|
||||
self.assertEqual(False, wal_paused)
|
||||
Reference in New Issue
Block a user