-
Notifications
You must be signed in to change notification settings - Fork 18
Allow to configure the compress algorithm in mysqldump and pg_dump #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| PATH | ||
| remote: . | ||
| specs: | ||
| geordi (12.5.0) | ||
| geordi (12.6.0) | ||
| highline | ||
| thor (~> 1) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,9 +17,7 @@ Feature: The dump command | |
|
|
||
| Scenario: Creating a dump of a remote database | ||
| Given a file named "Capfile" with "Capfile exists" | ||
| And a file named "config/deploy.rb" with: | ||
| """ | ||
| """ | ||
| And a file named "config/deploy.rb" with "deploy.rb exists" | ||
| And a file named "config/deploy/staging.rb" with: | ||
| """ | ||
| set :rails_env, 'staging' | ||
|
|
@@ -32,7 +30,7 @@ Feature: The dump command | |
| When I run `geordi dump staging` | ||
| Then the output should contain "# Dumping the database of staging" | ||
| And the output should contain "> Connecting to www.example.com" | ||
| And the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging --for_download'" | ||
| And the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging --for-download'" | ||
| And the output should contain "> Downloading remote dump to tmp/staging.dump" | ||
| # Omitting the absolute path in this regex (.*) | ||
| And the output should match: | ||
|
|
@@ -62,7 +60,7 @@ Feature: The dump command | |
|
|
||
| When I run `geordi dump staging --load` | ||
| Then the output should contain "# Dumping the database of staging" | ||
| And the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging --for_download'" | ||
| And the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging --for-download'" | ||
| And the output should contain "> Dumped the staging database to tmp/staging.dump" | ||
|
|
||
| # Loading the dump | ||
|
|
@@ -85,7 +83,7 @@ Feature: The dump command | |
|
|
||
| When I run `geordi dump staging --database primary` | ||
| Then the output should contain "# Dumping the database of staging (primary database)" | ||
| And the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging primary --for_download'" | ||
| And the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging primary --for-download'" | ||
| And the output should contain "> Dumped the primary staging database to tmp/staging.dump" | ||
|
|
||
|
|
||
|
|
@@ -110,7 +108,7 @@ Feature: The dump command | |
|
|
||
| When I run `geordi dump staging --database primary --load` | ||
| Then the output should contain "# Dumping the database of staging (primary database)" | ||
| And the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging primary --for_download'" | ||
| And the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging primary --for-download'" | ||
| And the output should contain "> Dumped the primary staging database to tmp/staging.dump" | ||
|
|
||
| # Loading the dump | ||
|
|
@@ -176,6 +174,7 @@ Feature: The dump command | |
| And the output should contain "Util.run! dropdb --if-exists test-other && createdb test-other && pg_restore --no-owner --no-acl --dbname=test-other tmp/production.dump" | ||
| But the output should not contain "Sourcing dump into the test-primary db" | ||
|
|
||
|
|
||
| Scenario: Sourcing a dump into one of multiple databases without specifying a db | ||
| Given a file named "tmp/production.dump" with "some content" | ||
| And a file named "config/database.yml" with: | ||
|
|
@@ -193,3 +192,32 @@ Feature: The dump command | |
| And the output should contain "Source file: tmp/production.dump" | ||
| And the output should contain "Util.run! dropdb --if-exists test-primary && createdb test-primary && pg_restore --no-owner --no-acl --dbname=test-primary tmp/production.dump" | ||
| But the output should not contain "Sourcing dump into the test-other db" | ||
|
|
||
|
|
||
| Scenario: Enforcing compression | ||
| When I run `geordi dump --compress` | ||
| Then the output should contain "Util.run! dumple development --compress" | ||
| And the output should contain "Successfully dumped the development database" | ||
|
|
||
|
|
||
| Scenario: Setting a custom compression algorithm | ||
| When I run `geordi dump --compress=zstd:3` | ||
| Then the output should contain "Util.run! dumple development --compress=zstd:3" | ||
| And the output should contain "Successfully dumped the development database" | ||
|
|
||
|
|
||
| Scenario: Setting a custom compression algorithm for a remote target | ||
| Given a file named "Capfile" with "Capfile exists" | ||
| And a file named "config/deploy.rb" with "deploy.rb exists" | ||
| And a file named "config/deploy/staging.rb" with: | ||
| """ | ||
| set :rails_env, 'staging' | ||
| set :deploy_to, '/var/www/example.com' | ||
| set :user, 'user' | ||
|
|
||
| server 'www.example.com' | ||
| """ | ||
|
|
||
| When I run `geordi dump staging --compress=zstd:3` | ||
| Then the output should contain "Util.run! ssh, [email protected], -t, cd /var/www/example.com/current && bash --login -c 'dumple staging --compress=zstd:3 --for-download'" | ||
| And the output should contain "> Dumped the staging database to tmp/staging.dump" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.