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

Update the installation script to handle Docker #2446

Open
palisadoes opened this issue Nov 17, 2024 · 3 comments
Open

Update the installation script to handle Docker #2446

palisadoes opened this issue Nov 17, 2024 · 3 comments
Assignees
Labels
good first issue Good for newcomers test Testing application unapproved

Comments

@palisadoes
Copy link
Contributor

palisadoes commented Nov 17, 2024

Is your feature request related to a problem? Please describe.

  • The current setup script doesn't make the necessary changes to the .env file that are required for Docker to work correctly

Describe the solution you'd like

  • Update the setup script to make the necessary changes to the .env file that are required for Docker to work correctly

Your job is to make the execution of the setup.ts file be:

  1. foolproof
  2. intuitive to use
  3. easier and simpler to use

A tech novice or new contributor should be able to install the API without issue.

For the successful completion of this issue:

  1. Write code to thoroughly test the setup.ts file without manually inputting responses to prompts, including:
    1. all relevant functions, methods and classes where applicable.
    2. all user prompts
  2. Ensure that running the tests is a part of our existing PR and Husky git commit workflows

This may mean making changes to the setup.ts file.

Describe alternatives you've considered

  • N/A

Approach to be followed (optional)

This issue may require the refactoring of this script file to make it:

  1. Easier to test
  2. Easier to maintain

Testing must verify that the:

  1. Default values for input are correct:
    1. When a parameter is already configured
    2. When a parameter is not configured
  2. Functionality when parameters are missing from the configuration is maintained
  3. Sequencing of the prompts is maintained
  4. Configuration parameters that rely on any external APIs (eg. database, mail) must be tested.
    1. The tests don't hang when testing these APIs whether or not the API connectivity is validated
  5. Preexisting comments in the test configuration file are maintained when the final configuration is saved
  6. Final configuration isn't saved until the last question is answered. In other words, hitting CTRL-C at any point before the last question will not affect the original configuration.
  7. Wording of the prompts in all scenarios is unchanged
  8. Test database loads without issue
  9. Previously correctly answered questions are not repeated
  10. Correct values are echoed when:
    1. entered,
    2. updated or
    3. previously found in the configuration
  11. Prompts correctly bypass sections that the user doesn't want to configure.
    1. For example, there are multiple SMTP and Redis configuration parameters.
      1. Optional parameter sections: If the person installing the API doesn't want to update SMTP parameters they should be skipped, otherwise prompted
      2. Mandatory parameter sections: If the person installing the API doesn't want to update configured mandatory Redis parameters, they should be skipped, otherwise prompted
  12. Input of mandatory parameters cannot be avoided if they are not previously configured

Plus any other tests that could avoid failure based on the PR comments for the issues below.

Other items to consider include:

  1. The test file must be located in the existing tests/ directory
  2. The test file has good readability
  3. Not making any changes to files in the .github directory

Additional context

  • N/A

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

@github-actions github-actions bot added question Further information is requested test Testing application unapproved labels Nov 17, 2024
@VanshikaSabharwal
Copy link

@palisadoes . Can you please assign me this issue.

Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Nov 28, 2024
@VanshikaSabharwal
Copy link

I am working on this issue

@palisadoes palisadoes added the good first issue Good for newcomers label Nov 28, 2024
@github-actions github-actions bot removed the no-issue-activity No issue activity label Nov 29, 2024
@palisadoes palisadoes moved this from Backlog to In progress in Talawa-Admin (Tests) Dec 1, 2024
@palisadoes palisadoes removed question Further information is requested feature request labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers test Testing application unapproved
Projects
Status: In progress
Development

No branches or pull requests

2 participants