Skip to content

Commit

Permalink
Reduce machine count for running ceph tests
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Nov 22, 2024
1 parent 9909a91 commit d14919e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
4 changes: 3 additions & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ def switch(self, name: str, path: Optional[Path] = None, channel: Optional[str]
Raises:
ValueError: if both path and channel are provided, or neither are provided
"""
app = self.applications[name]
app = self.applications.get(name)
if not app:
return # Skip if the application is not in the bundle
if (not path and not channel) or (path and channel):
raise ValueError("channel and path are mutually exclusive")
if path:
Expand Down
12 changes: 2 additions & 10 deletions tests/integration/data/test-bundle-ceph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ applications:
channel: latest/edge
constraints: cores=2 mem=8G root-disk=16G
num_units: 1
options:
bootstrap-node-taints: "node-role.kubernetes.io/control-plane=:NoSchedule"
k8s-worker:
charm: k8s-worker
channel: latest/edge
constraints: cores=2 mem=8G root-disk=16G
num_units: 1
ceph-csi:
charm: ceph-csi
channel: latest/stable
Expand All @@ -30,17 +23,16 @@ applications:
num_units: 1
options:
monitor-count: 1
expected-osd-count: 1
expected-osd-count: 2
ceph-osd:
charm: ceph-osd
channel: quincy/stable
constraints: cores=2 mem=4G root-disk=16G
num_units: 3
num_units: 2
storage:
osd-devices: 1G,1
osd-journals: 1G,1
relations:
- [k8s, k8s-worker:cluster]
- [ceph-csi, k8s:ceph-k8s-info]
- [ceph-csi, ceph-mon:client]
- [ceph-mon, ceph-osd:mon]
5 changes: 1 addition & 4 deletions tests/integration/test_ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

# This pytest mark configures the test environment to use the Canonical Kubernetes
# bundle with ceph, for all the test within this module.
pytestmark = [
pytest.mark.bundle_file("test-bundle-ceph.yaml"),
pytest.mark.ignore_blocked,
]
pytestmark = [pytest.mark.bundle_file("test-bundle-ceph.yaml")]


def _get_data_file_path(name) -> str:
Expand Down

0 comments on commit d14919e

Please sign in to comment.