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

Add New Testcase Generators #311

Merged
merged 28 commits into from
Feb 14, 2024
Merged

Add New Testcase Generators #311

merged 28 commits into from
Feb 14, 2024

Conversation

MarkintoshZ
Copy link
Collaborator

@MarkintoshZ MarkintoshZ commented Jan 19, 2024

Problem and (slightly outdated) design proposal in #296

TODOS:

  • Added generator decorator supports k8s schema name, field name, field type, paths, and priority configuration
  • Refactoring normal testcases for primitive types
  • Refactoring semantic testcases for k8s schemas
  • Test implementing tests for composite schema and conditional subproperties
  • Validate the same test cases are generated

Copy link
Contributor

github-actions bot commented Jan 19, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  acto
  engine.py 24
  acto/cli
  schema_match.py 8, 47, 66-67, 75
  acto/input
  input.py 212-213, 222, 291-304, 310-350, 495, 497
  k8s_schemas.py 63, 66, 69, 180, 258, 288, 396, 398, 400, 406, 410, 414-417, 435, 439-441, 472, 482, 509, 624, 634, 655-670, 699-700
  kubernetes_property.py 1-92
  valuegenerator.py
  acto/input/known_schemas
  deployment_schemas.py
  known_schema.py
  pod_schemas.py
  resource_schemas.py
  service_schemas.py
  statefulset_schemas.py
  storage_schemas.py
  acto/input/test_generators
  cron_job.py 10-25, 31-46
  deployment.py 12-27
  generator.py 106, 269-271, 275-277
  pod.py 155-184, 218-240, 277-299, 311-318, 332-347, 355-363, 369-393, 399-407, 414-422, 435-442, 448-463, 469-484, 490-505, 511-526, 535-541
  primitive.py 26-43, 50-62, 75-215, 221-312, 457-561, 580-642, 648, 660-764
  resource.py 19-31, 39-54, 63-78
  service.py 9-21, 29-44
  stateful_set.py 10-14, 19-23, 29-61, 69-84
  storage.py 11-28, 34-41
  acto/monkey_patch
  monkey_patch.py
  acto/schema
  array.py
  object.py
Project Total  

The report is truncated to 25 files out of 38. To see the full report, please visit the workflow summary page.

This report was generated by python-coverage-comment-action

@MarkintoshZ MarkintoshZ mentioned this pull request Jan 19, 2024
11 tasks
@tylergu
Copy link
Member

tylergu commented Feb 7, 2024

@MarkintoshZ Should I reforce delete the last commit from this branch?

@tylergu tylergu marked this pull request as ready for review February 13, 2024 02:57
MarkintoshZ and others added 22 commits February 12, 2024 20:58
- generator decorator supports k8s schema name, field name, field type,
  paths, and priority configuration
Signed-off-by: Tyler Gu <[email protected]>
- Rename `field` to `property` in decorator
- Move test generator matching code to the TestGenerator data class
- Support multiple constraints for test generator matching
- Tests for multiple constraints
- Copied value generator code to the function decorator pattern
- Moved gen() method declaration in test generator to BaseSchema
- Moved gen() method implementation in [Type]Schemas
Signed-off-by: Tyler Gu <[email protected]>
@tylergu tylergu merged commit 79263d5 into main Feb 14, 2024
4 checks passed
@tylergu tylergu deleted the testcase-generator branch February 29, 2024 22:46
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