Skip to content

Commit

Permalink
Merge pull request #25 from canonical/meta_remove
Browse files Browse the repository at this point in the history
Update template to remove metadata
  • Loading branch information
swetha1654 authored Jan 16, 2025
2 parents 10f6b05 + 406f1d8 commit 9f3bbe3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 53 deletions.
38 changes: 38 additions & 0 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,48 @@
# See https://juju.is/docs/sdk/charmcraft-config for guidance.

type: charm
name: is-charms-template
title: Charm Template
summary: A very short one-line summary of the charm.
links:
documentation: https://discourse.charmhub.io
issues: https://github.com/canonical/is-charms-template-repo/issues
source: https://github.com/canonical/is-charms-template-repo
contact: https://launchpad.net/~canonical-is-devops

description: |
A single sentence that says what the charm is, concisely and memorably.
A paragraph of one to three short sentences, that describe what the charm does.
A third paragraph that explains what need the charm meets.
Finally, a paragraph that describes whom the charm is useful for.
bases:
- build-on:
- name: ubuntu
channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"

# The containers and resources metadata apply to Kubernetes charms only.
# Remove them if not required.

# Your workload’s containers.
containers:
httpbin:
resource: httpbin-image

# This field populates the Resources tab on Charmhub.
resources:
# An OCI image resource for each container listed above.
# You may remove this if your charm will run without a workload sidecar container.
httpbin-image:
type: oci-image
description: OCI image for httpbin
# The upstream-source field is ignored by Juju. It is included here as a reference
# so the integration testing suite knows which image to deploy during testing. This field
# is also used by the 'canonical/charming-actions' Github action for automated releasing.
upstream-source: kennethreitz/httpbin
50 changes: 0 additions & 50 deletions metadata.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

logger = logging.getLogger(__name__)

METADATA = yaml.safe_load(Path("./metadata.yaml").read_text(encoding="utf-8"))
APP_NAME = METADATA["name"]
CHARMCRAFT_DATA = yaml.safe_load(Path("./charmcraft.yaml").read_text(encoding="utf-8"))
APP_NAME = CHARMCRAFT_DATA["name"]


@pytest.mark.abort_on_fail
Expand All @@ -27,7 +27,7 @@ async def test_build_and_deploy(ops_test: OpsTest, pytestconfig: pytest.Config):
"""
# Deploy the charm and wait for active/idle status
charm = pytestconfig.getoption("--charm-file")
resources = {"httpbin-image": METADATA["resources"]["httpbin-image"]["upstream-source"]}
resources = {"httpbin-image": CHARMCRAFT_DATA["resources"]["httpbin-image"]["upstream-source"]}
assert ops_test.model
await asyncio.gather(
ops_test.model.deploy(
Expand Down

0 comments on commit 9f3bbe3

Please sign in to comment.