mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: add plain-HTTP listeners for various repository configurations to support non-HTTPS access
Signed-off-by: d9pouces <github@19pouces.net>
This commit is contained in:
@@ -353,6 +353,30 @@ def test_apply_writes_lein_profiles(tmp_path) -> None:
|
||||
)
|
||||
|
||||
|
||||
def test_apply_marks_non_https_lein_repository_as_insecure(tmp_path) -> None:
|
||||
data = {
|
||||
"uuid": "12345678-1234-5678-1234-567812345678",
|
||||
"organisation": "InterDiode",
|
||||
"configurations": {
|
||||
"java": {
|
||||
"repositories": [
|
||||
{"name": "interdiode", "url": "http://example.invalid/maven"}
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
dst = tmp_path / "dst"
|
||||
context = Context(config=make_config(data), dst=dst, src=None)
|
||||
|
||||
JavaModule().apply(context)
|
||||
|
||||
profiles = (dst / "root/.lein/profiles.clj").read_text(encoding="utf-8")
|
||||
assert profiles == (
|
||||
"{:user {:repositories "
|
||||
'[["interdiode" {:url "http://example.invalid/maven" :insecure true}]]}}\n'
|
||||
)
|
||||
|
||||
|
||||
def test_apply_with_certificates_and_repositories_writes_both(tmp_path) -> None:
|
||||
src = tmp_path / "src"
|
||||
(src / "usr/lib/jvm/java-21/lib/security").mkdir(parents=True)
|
||||
|
||||
Reference in New Issue
Block a user