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 test suite #21

Merged
merged 4 commits into from
Jan 5, 2024
Merged

Fix test suite #21

merged 4 commits into from
Jan 5, 2024

Conversation

robinboening
Copy link
Collaborator

@robinboening robinboening commented Feb 23, 2023

Scope of this PR

  • Adapt health endpoint tests to reflect current API behaviour (accessible without project_id)
  • Switch from decommissioned TestNet to Preview Testnet in health endpoint tests.
  • Make project_id optional as /health endpoint doesn't need to provide the secret
  • Adapt assets endpoint tests to reflect current API behaviour (400 response code for malformatted asset param)
  • Adapt block endpoint tests to reflect current API behaviour (400 response code for malformatted params)

- do not send project_id when requesting /health
- /health endpoint is intended to be accessible without secret
- switching from decommissioned testnet to preview testnet
reflecting current API behaviour, namely response status 400 for invalid asset parameter.
- reflecting current API behaviour (response code 400 for malformatted params)
@@ -17,7 +17,7 @@ class << self
# @param project_id [String] the project_id to pass to url in headers.
# @param params [Hash] params to add to request, allowed :order, :page, :count, :from, :to.
# @return [Hash] formatted result with status and body keys.
def get_response(url, project_id, params = {})
def get_response(url, project_id = nil, params = {})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

making project_id optional as /health doesn't need to provide the secret

@robinboening robinboening changed the title WiP Fix test suite Fix test suite Feb 23, 2023
@robinboening
Copy link
Collaborator Author

@mmahut now the test suite succeeds on my local machine.
267 examples, 0 failures, 7 pending

Though, as mentioned in #22, the suite doesn't run on Github, making the green checks here a red herring.

@mmahut
Copy link
Member

mmahut commented Feb 23, 2023

Thank you so much @robinboening!

Feel free to add it to workflows, it was never there, just on one testing branch.

@robinboening robinboening merged commit d39c7f3 into blockfrost:master Jan 5, 2024
1 check passed
@robinboening robinboening deleted the fix_tests branch January 5, 2024 21:32
@robinboening
Copy link
Collaborator Author

Fixed the pending specs as well.

267 examples, 0 failures

Merged.

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

Successfully merging this pull request may close these issues.

2 participants