generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Ubuntu 22.04 (jammy) support (#33)
- Loading branch information
1 parent
6df8527
commit 605e9bd
Showing
7 changed files
with
84 additions
and
13 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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright 2022 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
from argparse import ArgumentError | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--mysql-router-charm-series", help="Ubuntu series for mysql router charm (e.g. jammy)" | ||
) | ||
parser.addoption( | ||
"--mysql-router-charm-bases-index", | ||
type=int, | ||
help="Index of charmcraft.yaml base that matches --mysql-router-charm-series", | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
if (config.option.mysql_router_charm_series is None) ^ ( | ||
config.option.mysql_router_charm_bases_index is None | ||
): | ||
raise ArgumentError( | ||
None, | ||
"--mysql-router-charm-series and --mysql-router-charm-bases-index must be given together", | ||
) | ||
# Note: Update defaults whenever charmcraft.yaml is changed | ||
if config.option.mysql_router_charm_series is None: | ||
config.option.mysql_router_charm_series = "jammy" | ||
if config.option.mysql_router_charm_bases_index is None: | ||
config.option.mysql_router_charm_bases_index = 1 |
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