You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/export.feature
+11-8Lines changed: 11 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -502,7 +502,7 @@ Feature: Export content.
502
502
Test User
503
503
"""
504
504
505
-
@require-wp-5.2@require-mysql
505
+
@require-wp-5.2
506
506
Scenario: Export posts from a given starting post ID
507
507
Given a WP install
508
508
@@ -520,7 +520,11 @@ Feature: Export content.
520
520
10
521
521
"""
522
522
523
-
When I run `wp export --start_id=6`
523
+
# Read the 6th post's ID instead of hardcoding --start_id=6. SQLite does not reset auto-increment on `wp site empty`, so generated IDs aren't always 1..10.
524
+
When I run `wp post list --post_type=post --orderby=ID --order=ASC --posts_per_page=1 --offset=5 --format=ids`
525
+
Then save STDOUT as {START_ID}
526
+
527
+
When I run `wp export --start_id={START_ID}`
524
528
Then save STDOUT 'Writing to file %s' as {EXPORT_FILE}
525
529
526
530
When I run `wp site empty --yes`
@@ -801,14 +805,13 @@ Feature: Export content.
801
805
<wp:tag>
802
806
"""
803
807
804
-
@require-mysql
805
808
Scenario: Export without splitting the dump
806
809
Given a WP install
807
-
# Make export file > 15MB so will split by default. Need to split into 4 * 4MB to stay below 10% of default redo log size of 48MB, otherwise get MySQL error.
808
-
And I run `wp db query "INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES (1, '_dummy', REPEAT( 'A', 4 * 1024 * 1024 ) );"`
809
-
And I run `wp db query "INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES (1, '_dummy', REPEAT( 'A', 4 * 1024 * 1024 ) );"`
810
-
And I run `wp db query "INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES (1, '_dummy', REPEAT( 'A', 4 * 1024 * 1024 ) );"`
811
-
And I run `wp db query "INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES (1, '_dummy', REPEAT( 'A', 4 * 1024 * 1024 ) );"`
810
+
# Make export file > 15MB so will split by default. Need to split into 4 * 4MB to stay below 10% of default redo log size of 48MB, otherwise get MySQL error. Use `wp eval` + `str_repeat` because SQLite has no REPEAT() function.
811
+
And I run `wp eval "update_post_meta(1, '_dummy_0', str_repeat('A', 4 * 1024 * 1024));"`
812
+
And I run `wp eval "update_post_meta(1, '_dummy_1', str_repeat('A', 4 * 1024 * 1024));"`
813
+
And I run `wp eval "update_post_meta(1, '_dummy_2', str_repeat('A', 4 * 1024 * 1024));"`
814
+
And I run `wp eval "update_post_meta(1, '_dummy_3', str_repeat('A', 4 * 1024 * 1024));"`
0 commit comments