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

Allow tests to continue working when the Open Tree synthetic tree version changes #101

Open
gaurav opened this issue Jul 27, 2021 · 0 comments

Comments

@gaurav
Copy link
Member

gaurav commented Jul 27, 2021

We currently hardcode expected URLs for Open Tree resolution in our tests:

expect(resultObj.Alligatoridae[0].resolved).to.include({
'@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree12.3@ott195670',
label: 'Alligatoridae',
});
expect(resultObj.Alligatorinae[0].resolved).to.include({
'@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree12.3@ott151255',
label: 'Alligatorinae',
});
expect(resultObj.Crocodylidae[0].resolved).to.include({
'@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree12.3@ott1092501',
label: 'Longirostres',
});
expect(resultObj.Diplocynodontinae[0]).to.include({
error: 'no_mrca_found:400',
});

This is fine until the Open Tree of Life synthetic tree version, which is part of the URL, changes. Unfortunately, I don't see a way of requesting a node on a particular version of the synthetic tree. Therefore, we should change this test to work with whichever version of the Open Tree synthetic tree is returned. We will still need to change the node IDs if they change, but since those are tied to their Open Tree Taxonomy ID (e.g. Longirostris, which is ott1092501), they shouldn't change between releases unless the taxonomy has changed dramatically.

gaurav added a commit that referenced this issue Jul 27, 2021
A long term fix for this will be covered by
#101.
@gaurav gaurav mentioned this issue Jul 27, 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

1 participant