-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:charmed-kubernetes/cdk-shrinkwrap…
… into charmhub/address-charmhub-limitiations
- Loading branch information
Showing
14 changed files
with
87 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,33 @@ | ||
from tempfile import TemporaryDirectory | ||
from pathlib import Path | ||
from types import SimpleNamespace | ||
|
||
from jinja2 import FileSystemLoader, Environment | ||
import pytest | ||
|
||
DATA = Path(__file__).parent.parent / "data" | ||
|
||
|
||
@pytest.fixture(params=["applications", "services"]) | ||
def test_bundle(request, tmpdir): | ||
templateEnv = Environment(loader=FileSystemLoader(searchpath=DATA)) | ||
template = templateEnv.get_template("test_bundle.yaml") | ||
|
||
rendered = tmpdir / "test_bundle.yaml" | ||
with open(rendered, "w") as f: | ||
f.write(template.render({"apps_or_svcs": request.param})) | ||
yield SimpleNamespace(file=rendered, apps=request.param) | ||
|
||
|
||
@pytest.fixture | ||
def test_overlay(): | ||
yield DATA / "test_overlay.yaml" | ||
|
||
|
||
@pytest.fixture | ||
def test_container_listing(): | ||
yield DATA / "test_container_listing.txt" | ||
|
||
|
||
@pytest.fixture() | ||
def tmp_dir(): | ||
with TemporaryDirectory() as tp: | ||
yield tp | ||
@pytest.fixture | ||
def test_charm_config(): | ||
yield DATA / "test_charm_config.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters