Пример #1
0
def test_generates_attributes_as_dict(cd_fixtures, create_build_path):
    fixtures_path = cd_fixtures('attributes_as_dict')
    build_path = create_build_path()
    python_path = fixtures_path / 'python'
    reference_path = fixtures_path / 'reference'

    generate(python_path, build_path)

    assert_yaml_dirs_equal(build_path, reference_path)
Пример #2
0
def test_generates_tuple_multiple(cd_fixtures, create_build_path):
    fixtures_path = cd_fixtures('tuple_multiple')
    build_path = create_build_path()
    python_path = fixtures_path / 'python'
    reference_path = fixtures_path / 'reference'

    generate(python_path, build_path)

    assert_yaml_dirs_equal(build_path, reference_path)
Пример #3
0
def test_generates_simple_dict(cd_fixtures, create_build_path):
    fixtures_path = cd_fixtures('simple_dict')
    build_path = create_build_path()
    python_path = fixtures_path / 'python'
    reference_path = fixtures_path / 'reference'

    generate(python_path, build_path, 'my_kustomization')

    assert_yaml_dirs_equal(build_path, reference_path)
Пример #4
0
def test_generates_patchesJson6902(cd_fixtures, create_build_path):
    fixtures_path = cd_fixtures('patchesJson6902')
    build_path = create_build_path()
    python_path = fixtures_path / 'python'
    reference_path = fixtures_path / 'reference'

    generate(python_path, build_path)

    assert_yaml_dirs_equal(build_path, reference_path)
Пример #5
0
def test_generates_base_and_overlays(cd_fixtures, create_build_path):
    fixtures_path = cd_fixtures('base_and_overlays')
    build_path = create_build_path()
    python_path = fixtures_path / 'python'
    reference_path = fixtures_path / 'reference'

    generate(python_path, build_path)

    assert_yaml_dirs_equal(build_path, reference_path)
Пример #6
0
def test_generates_dataclasses(cd_fixtures, create_build_path):
    fixtures_path = cd_fixtures('dataclasses_')
    build_path = create_build_path()
    python_path = fixtures_path / 'python'
    reference_path = fixtures_path / 'reference'

    generate(python_path, build_path)

    assert_yaml_dirs_equal(build_path, reference_path)
Пример #7
0
def test_generates_simple_dict_defaults(cd_fixtures, create_build_path):
    fixtures_path = cd_fixtures('simple_dict_defaults')
    build_path = create_build_path()
    python_path = fixtures_path / 'python'
    reference_path = fixtures_path / 'reference'

    generate(python_path, build_path)

    assert_yaml_dirs_equal(build_path, reference_path)
Пример #8
0
def test_generates_kubernetes11(cd_fixtures, create_build_path):
    fixtures_path = cd_fixtures('kubernetes11')
    build_path = create_build_path()
    python_path = fixtures_path / 'python'
    reference_path = fixtures_path / 'reference'

    generate(python_path, build_path)

    assert_yaml_dirs_equal(build_path, reference_path)
Пример #9
0
def _generate_from_options(options):
    from kustomize.generators import generate

    source_path = Path(options.source_path)
    dest_path = Path(options.dest_path)
    generate(source_path, dest_path, options.attr_name)