Skip to content

Ensure default value of size_format flag is always bytes#69

Merged
danielbachhuber merged 9 commits intowp-cli:masterfrom
marksabbath:feature/default-value-size
Dec 6, 2017
Merged

Ensure default value of size_format flag is always bytes#69
danielbachhuber merged 9 commits intowp-cli:masterfrom
marksabbath:feature/default-value-size

Conversation

@marksabbath
Copy link
Collaborator

Default value of size_format flag is incorrect #64

  • Implemented a method to make the default value always be in bytes;
  • Implemented a generalized method to calc the size when --size_format is provided, which now will also calculate even when --tables is provided.

@danielbachhuber
Copy link
Member

@marksabbath Is this changing the default behavior? If so, we need to keep the existing behavior.

@marksabbath
Copy link
Collaborator Author

It was @danielbachhuber the commit 8ecaeb0 is to make the output looks exactly how it was outputting before. The only thing that changes is that the default value will not be expressed dynamically, it will now be expressed in bytes (B). Gonna take a look on behat errors now.

@marksabbath
Copy link
Collaborator Author

@danielbachhuber the error occuring on Travis doesnt seem to be related to the code itself, it sounds to be something on environment:

01. $ wp db tables
    wp_users
    wp_usermeta
    wp_posts
    wp_comments
    wp_links
    wp_options
    wp_postmeta
    wp_terms
    wp_term_taxonomy
    wp_term_relationships
    wp_termmeta
    wp_commentmeta
    wp_blogs
    wp_signups
    wp_site
    wp_sitemeta
    wp_registration_log
    wp_blog_versions
    
    cwd: /tmp/wp-cli-test-run-db-tables.feature.34-5a283cc92b1939.42814217/
    run time: 0.33614301681519
    exit status: 0
    In step `And STDOUT should contain:'.                                  # features/steps/then.php:15
    From scenario `List database tables on a multisite WordPress install'. # features/db-tables.feature:34
    Of feature `List database tables'.  

Remove `wp_sitecategories` from list of standard MS tables
@marksabbath
Copy link
Collaborator Author

Nevermind @danielbachhuber I just saw #70

@danielbachhuber
Copy link
Member

Oh. I fixed this in #70. Can you merge master?

@danielbachhuber
Copy link
Member

@marksabbath Happy with this now?

@marksabbath
Copy link
Collaborator Author

Totally @danielbachhuber anything that I should do to make this PR get accepted?

@danielbachhuber danielbachhuber merged commit e14ff7c into wp-cli:master Dec 6, 2017
@danielbachhuber danielbachhuber changed the title Default value of size_format flag is incorrect #64 Ensure default value of size_format flag is aways bytes Dec 15, 2017
@danielbachhuber danielbachhuber changed the title Ensure default value of size_format flag is aways bytes Ensure default value of size_format flag is always bytes Dec 15, 2017
@marksabbath marksabbath deleted the feature/default-value-size branch March 18, 2018 16:10
danielbachhuber added a commit that referenced this pull request Nov 18, 2022
Default value of size_format flag is incorrect #64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants