Skip to content

chore: refactor and enhance e2e test script #483

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

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

vprashar2929
Copy link
Contributor

@vprashar2929 vprashar2929 commented Oct 4, 2024

This commit refactors the existing e2e_test.sh script, making it more
generic, modular.

Key updates include:

  • Replaces the use of environment variables with command line arguments
    for better clarity and flexiability.

      💡 Examples:
        # Run test with estimator
          e2e_test.sh --estimator
    
        # Run test with model server
          e2e_test.sh --server
    
        # Run test with dummy weight model or power request
          e2e_test.sh --test
    
        # Enable model database
          e2e_test.sh --db
    
        # Run test with both estimator and server
          e2e_test.sh --estimator --server
    
        # Run test with estimator, server, and model database
          e2e_test.sh --estimator --server --db
    
  • Test logs and other useful information are now stored in the tmp/e2e directory for better organization and accessibility.

  • Adds a utils.bash file to store common utility functions

  • Updates existing GH workflows to align with the refactored script and
    adds a new step to upload test artifacts for easier debugging in case
    of failures.

  • Updates the README.md file

Addresses #452 #469

Checklist for PR Author


In addition to approval, the author must confirm the following check list:

  • Run the following command to format your code:

    make fmt
  • Create issues for unresolved comments and link them to this PR. Use one of the following labels:

    • must-fix: The logic appears incorrect and must be addressed.
    • minor: Typos, minor issues, or potential refactoring for better readability.
    • nit: Trivial issues like extra spaces, commas, etc.

@vprashar2929 vprashar2929 force-pushed the chore-e2e-sc branch 2 times, most recently from e9a1747 to 01dc791 Compare October 4, 2024 08:48
@vprashar2929 vprashar2929 changed the title chore: refactor the e2e test script chore: refactor and enhance e2e test script Oct 4, 2024
@sunya-ch
Copy link
Contributor

@vprashar2929 Thank you for the PR.
Looks very nice.
Could you please also update the document in https://github.com/sustainable-computing-io/kepler-model-server/tree/main/tests#integration-test for the corresponding change?

This commit refactors the existing `e2e_test.sh` script, making it more
generic, modular.

Key updates include:
- Replaces the use of environment variables with command line arguments
  for better clarity and flexiability.
  ```
    💡 Examples:
      # Run test with estimator
        e2e_test.sh --estimator

      # Run test with model server
        e2e_test.sh --server

      # Run test with dummy weight model or power request
        e2e_test.sh --test

      # Enable model database
        e2e_test.sh --db

      # Run test with both estimator and server
        e2e_test.sh --estimator --server

      # Run test with estimator, server, and model database
        e2e_test.sh --estimator --server --db
  ```
- Test logs and other useful information are now stored in the `tmp/e2e` directory for better organization and accessibility.

- Adds a `utils.bash` file to store common utility functions

- Updates existing GH workflows to align with the refactored script and
  adds a new step to upload test artifacts for easier debugging in case
  of failures.

- Updates the `README.md` file

Signed-off-by: vprashar2929 <vibhu.sharma2929@gmail.com>
@sthaha sthaha merged commit 3967d36 into sustainable-computing-io:main Oct 20, 2024
18 checks passed
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.

3 participants