diff --git a/config.yaml b/config.yaml index 01000db97..475d142ae 100644 --- a/config.yaml +++ b/config.yaml @@ -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: | diff --git a/src/charm_state.py b/src/charm_state.py index fc0f5dd66..e153222e2 100644 --- a/src/charm_state.py +++ b/src/charm_state.py @@ -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 diff --git a/tests/integration/test_charm_with_proxy.py b/tests/integration/test_charm_with_proxy.py index ce0b70731..a4cc8d7ed 100644 --- a/tests/integration/test_charm_with_proxy.py +++ b/tests/integration/test_charm_with_proxy.py @@ -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 diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py index 233fd6314..911df6b54 100644 --- a/tests/unit/test_charm.py +++ b/tests/unit/test_charm.py @@ -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") diff --git a/tests/unit/test_charm_state.py b/tests/unit/test_charm_state.py index 8e764b9bc..c40274346 100644 --- a/tests/unit/test_charm_state.py +++ b/tests/unit/test_charm_state.py @@ -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)