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

fastly: fix invalid package uploading test #385

Merged
merged 1 commit into from
Nov 16, 2022
Merged

fastly: fix invalid package uploading test #385

merged 1 commit into from
Nov 16, 2022

Conversation

glerchundi
Copy link
Contributor

It seems like the expected response from Fastly API slightly changed since it was added the test for invalid packages. Now, instead of returning package info with zeroed properties, it properly returns a specific HTTP error (bad request).

This PR changes the test to be compliant with the new behaviour.

Signed-off-by: Gorka Lerchundi Osa glertxundi@gmail.com

Copy link
Collaborator

@Integralist Integralist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change and then I'll approve and merge. Thanks for discovering this!

- FastlyGo/2.1.0 (+github.com/fastly/go-fastly; go1.15.4)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/2/package
- FastlyGo/7.0.0 (+github.com/fastly/go-fastly; go1.18.3)
url: https://api.fastly.com/service/pChqKASI98hryShq2mlDf6/version/2/package
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could run make fix-fixtures FASTLY_TEST_SERVICE_ID="pChqKASI98hryShq2mlDf6" and that should replace any reference to your Service ID with the go-fastly generic one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was pretty sure that I executed it 🤦. Probably I messed up between different test runs. Anyway, fixed and ready to review!

It seems like the expected response from Fastly API slightly changed
since it was added the test for invalid packages. Now, instead of
returning package info with zeroed properties, it properly returns a
specific HTTP error (bad request).

This PR changes the test to be compliant with the new behaviour.

Signed-off-by: Gorka Lerchundi Osa <glertxundi@gmail.com>
@Integralist Integralist merged commit 9ca49d7 into fastly:main Nov 16, 2022
@glerchundi glerchundi deleted the bugfix-package-test branch November 16, 2022 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants