tools: remove dnf-json socket start function
ensure_dnf_json() function no longer needed.
This commit is contained in:
parent
03e86cc31a
commit
b1ce6e18d5
1 changed files with 0 additions and 18 deletions
|
|
@ -63,27 +63,9 @@ class TestCaseGenerator:
|
|||
def __init__(self, test_case_request):
|
||||
self.test_case = test_case_request
|
||||
|
||||
def ensure_dnf_json(self):
|
||||
if os.path.exists("/.dockerenv"):
|
||||
if os.path.exists("/run/osbuild-dnf-json/api.sock"):
|
||||
# assume we are good to go
|
||||
return
|
||||
print("running in container and no dnf-json socket found")
|
||||
sys.exit(1)
|
||||
|
||||
command = ["systemctl", "is-active", "--quiet", "osbuild-dnf-json.socket"]
|
||||
if not is_subprocess_succeeding(command):
|
||||
print("osbuild-dnf-json.socket is not running, starting it up")
|
||||
command = ["systemctl", "start", "osbuild-dnf-json.socket", "--quiet"]
|
||||
if not is_subprocess_succeeding(command):
|
||||
print("impossible to start osbuild-dnf-json.socket with systemd")
|
||||
sys.exit(1)
|
||||
|
||||
def get_test_case(self, no_image_info, store):
|
||||
compose_request = json.dumps(self.test_case["compose-request"])
|
||||
|
||||
self.ensure_dnf_json()
|
||||
|
||||
pipeline_command = ["go", "run", "./cmd/osbuild-pipeline", "-"]
|
||||
self.test_case["manifest"] = json.loads(get_subprocess_stdout(pipeline_command, input=compose_request, encoding="utf-8"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue