Skip to content

Commit

Permalink
Add docker config group id test
Browse files Browse the repository at this point in the history
  • Loading branch information
badrogger committed Sep 11, 2024
1 parent 254009b commit c7655f1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/core/host/docker_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import shutil
from contextlib import contextmanager
from timeit import default_timer as timer
from node_cli.core.docker_config import get_docker_group_id, save_docker_group_id

import pytest

Expand All @@ -17,7 +18,8 @@
ensure_service_overriden_config,
OverridenConfigExsitsError,
SocketInitTimeoutError,
wait_for_socket_initialization
wait_for_socket_initialization,
NODE_DOCKER_CONFIG_PATH,
)


Expand Down Expand Up @@ -151,3 +153,10 @@ def test_wait_for_socket_initialization(tmp_dir):
pathlib.Path(socket_path).touch()
with in_time(1):
wait_for_socket_initialization(socket_path)


def test_get_save_group_id():
gid = get_docker_group_id()
save_docker_group_id(gid)
with open(NODE_DOCKER_CONFIG_PATH) as config_path:
assert json.load(config_path)['docker_group_id'] == gid

0 comments on commit c7655f1

Please sign in to comment.