Skip to content

Commit

Permalink
Create test generator directory
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Jan 21, 2024
1 parent be68d37 commit a7dd41b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from dataclasses import dataclass
from typing import Callable, Literal, Optional

import pydantic

from acto.input.k8s_schemas import KubernetesObjectSchema
from acto.input.testcase import TestCase
from acto.schema import (
Expand Down Expand Up @@ -84,6 +86,7 @@ def generator(
), "One of k8s_schema_name, schema_name, schema_type, paths must be specified"

def wrapped_func(func: Callable[[BaseSchema], list[TestCase]]):
func = pydantic.validate_call(func)
gen_obj = TestGenerator(
k8s_schema_name,
field_name,
Expand Down
6 changes: 5 additions & 1 deletion test/integration_tests/test_testcase_generator_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@

import yaml

from acto.input.generator import TEST_GENERATORS, generator, get_testcases
from acto.input.k8s_schemas import K8sSchemaMatcher
from acto.input.test_generators.generator import (
TEST_GENERATORS,
generator,
get_testcases,
)
from acto.input.testcase import TestCase
from acto.schema import extract_schema

Expand Down

0 comments on commit a7dd41b

Please sign in to comment.