Include support for TB and GB database size formats#81
Merged
schlessera merged 4 commits intowp-cli:masterfrom Jan 24, 2018
Merged
Include support for TB and GB database size formats#81schlessera merged 4 commits intowp-cli:masterfrom
schlessera merged 4 commits intowp-cli:masterfrom
Conversation
Add cases for tb and gb, so that terabyte and gigabyte options are support in the db command.
Match the existing to use terabytes and gigabytes
schlessera
requested changes
Jan 23, 2018
src/DB_Command.php
Outdated
| define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES ); | ||
| } | ||
| if ( ! defined( 'GB_IN_BYTES' ) ) { | ||
| define( 'GB_IN_BYTES', 1024 * KB_IN_BYTES ); |
Member
There was a problem hiding this comment.
Should be 1024 * MB_IN_BYTES
src/DB_Command.php
Outdated
| define( 'GB_IN_BYTES', 1024 * KB_IN_BYTES ); | ||
| } | ||
| if ( ! defined( 'TB_IN_BYTES' ) ) { | ||
| define( 'TB_IN_BYTES', 1024 * KB_IN_BYTES ); |
Member
There was a problem hiding this comment.
Should be 1024 * GB_IN_BYTES
Changed GB_IN_BYTES to be defined correctly in MB_IN_BYTES and TB_IN_BYTES to be defined correctly in GB_IN_BYTES
schlessera
approved these changes
Jan 23, 2018
Member
|
Ah, I forgot to mention that we should also extend the test suite to cover these switches: https://github.com/wp-cli/db-command/blob/master/features/db-size.feature#L33-L51 @lukecav Could you add the additional test cases to the above feature file as well, please? It should be a matter of copy-pasting mostly. |
Add scenarios for both gb and tb.
Member
|
Thanks, @lukecav ! |
danielbachhuber
pushed a commit
that referenced
this pull request
Nov 18, 2022
Include support for TB and GB size formats
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added cases for tb and gb, so that terabyte and gigabyte options are supported in the db command for #80