Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce machine count for running ceph tests #186

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading