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

Create test to ensure environment variables are read in correctly #61

Open
surchs opened this issue Nov 27, 2023 · 4 comments
Open

Create test to ensure environment variables are read in correctly #61

surchs opened this issue Nov 27, 2023 · 4 comments
Labels
_flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again PR welcome Issue that is not an internal priority, but external PRs to address it are welcome.

Comments

@surchs
Copy link
Contributor

surchs commented Nov 27, 2023

We need a test to ensure NB_API_QUERY_URL and NB_IS_FEDERATION_API env vars are correctly parsed, checked, and if needed adjusted for the app:

export const queryURL: string = baseAPIURL.endsWith('/')
? `${baseAPIURL}query/?`
: `${baseAPIURL}/query/?`;
export const attributesURL: string = baseAPIURL.endsWith('/')
? `${baseAPIURL}attributes/`
: `${baseAPIURL}/attributes/`;
export const nodesURL: string = baseAPIURL.endsWith('/')
? `${baseAPIURL}nodes/`
: `${baseAPIURL}/nodes/`;
export const isFederationAPI: string =
import.meta.env.NB_IS_FEDERATION_API === undefined ? true : import.meta.env.NB_IS_FEDERATION_API;

What needs to happen:

  • write a cypress test (e2e probably) that mocks the ENV file / ENV variables
  • confirm that these variables are read in as expected, e.g. by confirming the axios call goes out to the right API (cy.intercept)
Copy link

We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 75 days.
We have applied the _flag:stale label to indicate that this issue should be reviewed again.
When you review, please reread the spec and then apply one of these three options:

  • prioritize: apply the flag:schedule label to suggest moving this issue into the backlog now
  • close: if the issue is no longer relevant, explain why (give others a chance to reply) and then close.
  • archive: sometimes an issue has important information or ideas but we won't work on it soon. In this case
    apply the someday label to show that this won't be prioritized. The stalebot will ignore issues with this
    label in the future. Use sparingly!

@github-actions github-actions bot added the _flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again label Feb 12, 2024
@surchs
Copy link
Contributor Author

surchs commented Mar 7, 2024

@rmanaem wdyt about this one? transfer or close?

@rmanaem
Copy link
Contributor

rmanaem commented Mar 7, 2024

Let's transfer this.

@rmanaem rmanaem transferred this issue from neurobagel/old-query-tool Mar 7, 2024
@surchs surchs added the PR welcome Issue that is not an internal priority, but external PRs to address it are welcome. label Mar 7, 2024
@rmanaem rmanaem removed the _flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again label Mar 7, 2024
Copy link

We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 75 days.
We have applied the _flag:stale label to indicate that this issue should be reviewed again.
When you review, please reread the spec and then apply one of these three options:

  • prioritize: apply the flag:schedule label to suggest moving this issue into the backlog now
  • close: if the issue is no longer relevant, explain why (give others a chance to reply) and then close.
  • archive: sometimes an issue has important information or ideas but we won't work on it soon. In this case
    apply the someday label to show that this won't be prioritized. The stalebot will ignore issues with this
    label in the future. Use sparingly!

@github-actions github-actions bot added the _flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again PR welcome Issue that is not an internal priority, but external PRs to address it are welcome.
Projects
Status: No status
Development

No branches or pull requests

2 participants