Skip to content

Commit

Permalink
Add experimental prefix to config name
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed Nov 20, 2023
1 parent 4fa166f commit 8de5627
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ options:
The private docker registry configured as dockerhub mirror to be used by the runners. If set
a message will be displayed prior to job execution on self-hosted runner informing users to
use the provided registry.
use-aproxy:
experimental-use-aproxy:
type: boolean
default: false
description: |
Expand Down
2 changes: 1 addition & 1 deletion src/charm_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def from_charm(cls, charm: CharmBase) -> "ProxyConfig":
Returns:
Current proxy config of the charm.
"""
use_aproxy = bool(charm.config.get("use-aproxy"))
use_aproxy = bool(charm.config.get("experimental-use-aproxy"))
http_proxy = get_env_var("JUJU_CHARM_HTTP_PROXY") or None
https_proxy = get_env_var("JUJU_CHARM_HTTPS_PROXY") or None
no_proxy = get_env_var("JUJU_CHARM_NO_PROXY") or None
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_charm_with_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def app_with_aproxy_fixture(
}
)

await app_no_runner.set_config({"use-aproxy": "true"})
await app_no_runner.set_config({"experimental-use-aproxy": "true"})

return app_no_runner

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_on_config_changed_failure(self, run, wt, mkdir, rm):
rm.return_value = mock_rm = MagicMock()
mock_rm.get_latest_runner_bin_url = mock_get_latest_runner_bin_url
harness = Harness(GithubRunnerCharm)
harness.update_config({"use-aproxy": True})
harness.update_config({"experimental-use-aproxy": True})
harness.begin()

assert harness.charm.unit.status == BlockedStatus("Invalid proxy configuration")
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_charm_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_aproxy_proxy_missing():
"""
charm = MagicMock()
charm.model.relations.__getitem__.return_value = []
charm.config = {"use-aproxy": "true"}
charm.config = {"experimental-use-aproxy": "true"}

with pytest.raises(CharmConfigInvalidError):
State.from_charm(charm)
Expand Down

0 comments on commit 8de5627

Please sign in to comment.