Skip to content
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

fix(gatsby-source-wordpress): fix integration tests #35399

Merged
merged 3 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ Array [
"id": "cG9zdDo3NzUy",
"mediaItemUrl": "http://localhost:8001/wp-content/uploads/2020/08/1003-1181x1772-1.jpg",
},
Object {
"id": "cG9zdDo3NzYw",
"mediaItemUrl": "http://localhost:8001/wp-content/uploads/2020/08/10-2500x1667-1.jpg",
},
Object {
"id": "cG9zdDo5Ng==",
"mediaItemUrl": "http://localhost:8001/wp-content/uploads/2018/10/brandon-siu-608784-unsplash-scaled.jpg",
Expand Down
4,364 changes: 3,993 additions & 371 deletions integration-tests/gatsby-source-wordpress/docker/seed/backup.sql

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe(`data resolution`, () => {

expect(data[`allWpMediaItem`].nodes).toBeTruthy()
expect(data[`allWpMediaItem`].nodes).toMatchSnapshot()
expect(data[`allWpMediaItem`].totalCount).toBe(17)
expect(data[`allWpMediaItem`].totalCount).toBe(16)

expect(data[`allWpTag`].totalCount).toBe(5)
expect(data[`allWpUser`].totalCount).toBe(1)
Expand Down Expand Up @@ -89,7 +89,7 @@ describe(`data resolution`, () => {
expect(gatsbyResult.data.allWpContentNode.nodes.length).toBe(
// we add a media item node before running our warm cache build.
// so 30 before 31 after
isWarmCache ? 31 : 30
isWarmCache ? 30 : 29
)
})

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-wordpress/docs/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ If you start up docker by running `npm run docker-clean-start` at `[gatsby-monor
Alternatively, you can install the MySQL client cli for your particular OS/distribution and use the following command to create a dump in a file named `backup.sql` in your current working directory:

```bash
mysqldump --user=wordpress --password=<redacted-password> --port=3306 --host=127.0.0.1 --no-tablespaces --databases wordpress > backup.sql
mysqldump --user=wordpress --password=gtsb-wp-dckr-user --port=3306 --host=127.0.0.1 --no-tablespaces --databases wordpress > backup.sql
```