Skip to content

Commit aa3fc78

Browse files
authored
Merge pull request #13 from opalstack/feat/app_mark_installed
Add app mark_installed action
2 parents 0ddb62d + 6b98545 commit aa3fc78

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = opalstack
3-
version = 1.0.2
3+
version = 1.0.3
44
author = Opalstack
55
author_email = [email protected]
66
description = Opalstack API Python Library

src/opalstack/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '1.0.2'
1+
VERSION = '1.0.3'
22
__version__ = VERSION
33

44
from .api import Api

src/opalstack/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def wait_deleted(self, model_name, uuids, delay=5.0, tries=0):
131131
pending_uuids = list(uuids)
132132
i = 0
133133
while True:
134-
#time.sleep(delay)
134+
time.sleep(delay)
135135
i += 1
136136
log.debug(f'Checking deleted ({i}/{tries}) for {model_name} uuids: {repr(pending_uuids)}')
137137
for uuid in pending_uuids:

src/opalstack/apps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def update(self, *args, **kwargs): return super().update(*args, **kwargs)
1616
def update_one(self, *args, **kwargs): return super().update_one(*args, **kwargs)
1717
def delete(self, *args, **kwargs): return super().delete(*args, **kwargs)
1818
def delete_one(self, *args, **kwargs): return super().delete_one(*args, **kwargs)
19+
def mark_installed(self, app_ids):
20+
self.api.http_post_result(f'/app/installed/', [{'id': app_id} for app_id in app_ids], ensure_status=[200])
1921

2022
def check_equals(self, a, b):
2123
return ( a['name'] == b['name'] and

tests/test_psqltool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def remote_psqldb(psqluser_server, remote_psqluser):
7575

7676
def test_psqltool(psqluser_server, local_psqluser, local_psqldb, remote_osuser, remote_psqluser, remote_psqldb):
7777
# Some time for pg_hba update
78-
time.sleep(45)
78+
time.sleep(60)
7979

8080
this_psqltool = PsqlTool('localhost', 5432, local_psqluser['name'], local_psqluser['default_password'], local_psqldb['name'], 'this.sqlpasswd')
8181
this_psqltool.export_local_db('this.sql')

0 commit comments

Comments
 (0)