+ def test_make_pod_command_with_web_admin_api_enabled(self) -> NoReturn:
+ """Testing make pod command."""
+ port = 9090
+ config = {
+ "web_subpath": "/",
+ "default_target": "",
+ "site_url": "",
+ "enable_web_admin_api": True,
+ }
+
+ expected_result = [
+ "/bin/prometheus",
+ "--config.file=/etc/prometheus/prometheus.yml",
+ "--storage.tsdb.path=/prometheus",
+ "--web.console.libraries=/usr/share/prometheus/console_libraries",
+ "--web.console.templates=/usr/share/prometheus/consoles",
+ "--web.route-prefix={}".format(config.get("web_subpath")),
+ "--web.external-url=http://localhost:{}{}".format(
+ port, config.get("web_subpath")
+ ),
+ "--web.enable-admin-api",
+ ]
+
+ pod_envconfig = pod_spec._make_pod_command(config, port)
+
+ self.assertListEqual(expected_result, pod_envconfig)
+