Skip to content

Commit

Permalink
add test file
Browse files Browse the repository at this point in the history
  • Loading branch information
bgruening committed Oct 15, 2017
1 parent e2f86ae commit 84b316d
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
28 changes: 28 additions & 0 deletions tools/pg_tools/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: pgtools
owner: bgruening
description: tool suite for dealing with Postgresql databases from Galaxy's history

long_description: |
The postgresql tools, are using a postgresql database in user-space.
Databases are packed into a tarball and stored in the user-history.
These tools are based on https://github.com/solidsnack/pglite to interact with postgresql in user-space.
categories:
- Data Export
- Data Source
remote_repository_url: https://github.com/bgruening/galaxytools/tools/pgtools
homepage_url: https://www.postgresql.org

auto_tool_repositories:
name_template: "{{ tool_id }}"
description_template: "Postgresql toolbox: {{ tool_name }}"
suite:
name: "postgresql_suite"
description: "A suite of Galaxy tools for dealing with Postgresql databases from Galaxy's history"

long_description: |
The postgresql tools, are using a postgresql database in user-space.
Databases are packed into a tarball and stored in the user-history.
These tools are based on https://github.com/solidsnack/pglite to interact with postgresql in user-space.
16 changes: 10 additions & 6 deletions tools/pg_tools/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
</token>

<token name="@PG_SETUP@"><![CDATA[
pglite setup -d ./postgresql &&
@PG_START@
pglite setup -d ./postgresql &&
@PG_START@
]]>
</token>

Expand All @@ -42,9 +42,13 @@
</token>

<token name="@STATUS_RUNNING@"><![CDATA[
###sleep 5
timeout 15 bash -c 'until pglite status -d ./postgresql | grep -F -q "server is running"; do sleep 1; done'
timeout 30 bash -c 'until pglite status -d ./postgresql | grep -F -q "server is running"; do sleep 1; done' &&
timeout 30 bash -c 'until ls -la ./postgresql | grep -F -q ".s.PGSQL.5432"; do sleep 1; done'
]]>
</token>

<token name="@STOPPED@"><![CDATA[
timeout 30 bash -c 'until pglite status -d ./postgresql | grep -F -q "no server running"; do sleep 1; done'
]]>
</token>

Expand All @@ -56,12 +60,12 @@

<token name="@PG_STOP@"><![CDATA[
pglite stop -d ./postgresql &&
sleep 10
@STOPPED@
]]>
</token>

<token name="@ARCHIVE_DATABASE@"><![CDATA[
tar -cvjf postgresql_out.tar.tar.bz2 ./postgresql
tar -cvjf postgresql_out.tar.bz2 postgresql
]]>
</token>
<xml name="citations">
Expand Down
2 changes: 1 addition & 1 deletion tools/pg_tools/pg-import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<tests>
<test>
<param name="infile" value="init-galaxy-db.sql.in" ftype="txt" />
<output file="pg_import_result1.pg.tar.bz2" name="outfile" ftype="postgresql" compare="sim_size" />
<output file="pg_import_result1.pg.tar.bz2" name="outfile" ftype="postgresql" compare="sim_size" delta="200000" />
</test>
</tests>
<help>
Expand Down
Binary file not shown.
Binary file removed tools/pg_tools/test-data/pg_import_result1.pg.tar.xz
Binary file not shown.

0 comments on commit 84b316d

Please sign in to comment.