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

Tries to run tests on /collections/null?_fd=0&pb=0 if the store has no custom collections #26

Open
JasonHassold opened this issue Dec 2, 2021 · 3 comments

Comments

@JasonHassold
Copy link

In the case where you have a store that only contains smart collections the lighthouse-ci-action will try to run tests on /collections/null?_fd=0&pb=0 since null is the response that it gets from collection_response="$(api_request "$host/admin/api/2021-04/custom_collections.json?published_status=published&limit=1")"

The request should probably instead be made to the /collections.json API route

@charlespwd
Copy link
Collaborator

The /collections.json route doesn't seem to exist. Unless I'm misreading our own docs 🙈

image

But we definitely could try to ping /smart_collections.json when the result is null.

@JasonHassold
Copy link
Author

Haha you are right that it isn't documented but I tried it and it seems to be working. I was originally going to recommend checking if it is null and then pinging /smart_collections.json as a backup, but then I just tried /collections.json (which imo makes sense as a route) and it returned a result. The docs should probably be updated to include this route since it seems to be a part of the API, but idk where to report that

@charlespwd
Copy link
Collaborator

Thanks for letting me know. I'll ping the docs team!

@charlespwd charlespwd mentioned this issue Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants