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

as_type seems to be used incorrectly #56

Closed
CasperWA opened this issue Feb 9, 2021 · 0 comments · Fixed by #57
Closed

as_type seems to be used incorrectly #56

CasperWA opened this issue Feb 9, 2021 · 0 comments · Fixed by #57
Assignees
Labels
bug Something isn't working

Comments

@CasperWA
Copy link
Member

CasperWA commented Feb 9, 2021

In the test of as type, it seems we're passing the root base URL, which shouldn't be the case, right? We should pass in a full URL to a relevant single endpoint that should be validated using the passed type?

I.e., instead of testing:

TEST_BASE_RUN_VALIDATOR="optimade-validator $( for i in {1..${INPUT_VERBOSITY}}; do echo '-v '; done; )--as-type ${VALID_AS_TYPE_VALUE} ${INPUT_PROTOCOL}://${INPUT_DOMAIN}${INPUT_PATH}"

We should be testing:

TEST_BASE_RUN_VALIDATOR="optimade-validator $( for i in {1..${INPUT_VERBOSITY}}; do echo '-v '; done; )--as-type ${VALID_AS_TYPE_VALUE} ${INPUT_PROTOCOL}://${INPUT_DOMAIN}${INPUT_PATH}v1/structures/${VALID_STRUCTURE_ID}"

Where VALID_STRUCTURE_ID is a variable that ensures we are testing a valid structure ID.
Note, VALID_AS_TYPE_VALUE=structure here.

Essentially, the action should avoid adding versioned parts to the URL and simply use the passed path parameter as is.

@CasperWA CasperWA added the bug Something isn't working label Feb 9, 2021
@CasperWA CasperWA self-assigned this Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant