Skip to content

Commit 3c338db

Browse files
test:docker: Create a common group for parsec users
Motive: The latest rust release (1.65) seems to handle the registry differently. It needs to write permissions to the registry for each command. Even if the package is in the registry. Solution: Create a common group for parsec clients users which grant them r/w access to the registry (files in general). Set the group owner of /opt/rust/registry to the common group and set permissions to 775. i.e. "drwxrwxr-x 1 root parsec-clients registry" Signed-off-by: Mohamed Omar Asaker <[email protected]>
1 parent 5170e7b commit 3c338db

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

ci.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ if [ "$PROVIDER_NAME" = "all" ]; then
393393
# Needed because parsec-client-1 and 2 write to those locations owned by root
394394
chmod 777 /tmp/parsec/e2e_tests
395395
chmod 777 /tmp/
396-
chmod -R 777 /opt/rust/registry
396+
chmod -R 775 /opt/rust/registry
397+
chgrp -R parsec-clients /opt/rust/registry
397398

398399
# PATH is defined before each command for user to use their own version of the Rust toolchain
399400
su -c "PATH=\"/home/parsec-client-1/.cargo/bin:${PATH}\";RUST_BACKTRACE=1 cargo test $TEST_FEATURES --manifest-path ./e2e_tests/Cargo.toml --target-dir /home/parsec-client-1 all_providers::multitenancy::client1_before" parsec-client-1

e2e_tests/docker_image/parsec-service-test-all.Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ RUN apt install -y --fix-missing wget python3 cmake clang
1616
RUN apt install -y libini-config-dev libcurl4-openssl-dev curl libgcc1
1717
RUN apt install -y python3-distutils libclang-6.0-dev protobuf-compiler python3-pip
1818
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
19-
2019
WORKDIR /tmp
2120

2221
# Download and install TSS 2.0
@@ -107,8 +106,13 @@ COPY _exec_wrapper /usr/local/bin/
107106
RUN ls /opt/rust/bin | xargs -n1 -I% ln -s /usr/local/bin/_exec_wrapper /usr/local/bin/$(basename %)
108107

109108
# Add users for multitenancy tests
110-
RUN useradd -m parsec-client-1
111-
RUN useradd -m parsec-client-2
109+
RUN useradd -m parsec-client-1 \
110+
&& useradd -m parsec-client-2 \
111+
&& groupadd parsec-clients \
112+
&& usermod -g parsec-clients parsec-client-1 \
113+
&& usermod -g parsec-clients parsec-client-2 \
114+
&& sed -i '/^UMASK/s/022/002/' /etc/login.defs
115+
112116

113117
# Add `/usr/local/lib` to library path for Trusted service provider
114118
ENV LD_LIBRARY_PATH="/usr/local/lib"

0 commit comments

Comments
 (0)