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

Adding workload unit tests #3403

Draft
wants to merge 5 commits into
base: development
Choose a base branch
from

Conversation

maayarosama
Copy link
Contributor

Description

Added six test case for workload

Changes

Test cases are:

  • should create a valid Workload instance
  • should handle valid Workload properties
  • should correctly serialize and deserialize Workload
  • should compute the challenge string correctly
  • should handle invalid Workload type
  • should handle invalid DeploymentResult

Related Issues

Tested Scenarios

Screenshot from 2024-09-11 16-17-20

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

case WorkloadTypes.zmachine:
instance = new Zmachine();
computeCapacity.cpu = 1;
computeCapacity.memory = 256 * 1024 ** 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be a good idea to declare 1024 as a constant as it is used more than once

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be a good idea to declare 1024 as a constant as it is used more than once

I think this's not needed as I only used twice and the 1024 indicates the number of bytes

Copy link
Contributor

@amiraabouhadid amiraabouhadid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't there test cases for the zmount and qsfs workload type?

@maayarosama
Copy link
Contributor Author

Why aren't there test cases for the zmount and qsfs workload type?

Please elaborate

@amiraabouhadid
Copy link
Contributor

Why aren't there test cases for the zmount and qsfs workload type?

Please elaborate

why do you only have tests for workload type zmachine when there are other types we can test as well? I think we should write more tests that test workload types other than zmachine for a more extensive test coverage.

@maayarosama maayarosama marked this pull request as draft September 23, 2024 11:13
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.

2 participants