Skip to content

Commit 277eaea

Browse files
committed
Adapted tests.
1 parent 9716ea6 commit 277eaea

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ No more steps are needed as AFS can handle the I/O permissions for the Xboinc se
5050

5151
**Important!!! If you are using EOS, you need to set the proper permissions for the Xboinc server to access your folder!!**
5252

53-
You can do this by accessing the desired folder from the CERNBox web interface, right-clicking on the folder and selecting "Share", then adding the user `a:sixtadm` (n.b. this is the Xboinc service account) with the "Write" permission. It should look like this:
53+
You can do this by accessing the desired folder from the CERNBox web interface, right-clicking on the folder and selecting "Share", then adding the user `a:sixtadm` (n.b. this is the Xboinc service account) and invite as editor. It should look like this:
5454

5555
![Share folder with Xboinc service account](docs/img/share_folder_with_xboinc_service_account.png)
5656

tests/test_02_user.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def assert_user_data(
100100

101101
# Check user data dictionary
102102
user_data = get_user_data(account)
103-
assert user_data["directory"] == Path(expected_directory).as_posix()
103+
assert user_data["directory"] == FsPath(expected_directory).as_posix()
104104
assert user_data["domain"] == expected_domain
105105

106106

@@ -253,6 +253,9 @@ def test_register(server_files, user_path):
253253
with pytest.raises(NotImplementedError):
254254
xb.register(TestConfig.TEST_ACCOUNT, user_path[1])
255255

256+
# Force usage with flag
257+
xb.register(TestConfig.TEST_ACCOUNT, user_path[1], permissions_given=True)
258+
256259
else:
257260
# Test successful registration
258261
# print(f"Registering user {TestConfig.TEST_ACCOUNT}")

tests/test_03_submission_and_retrieval.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
# Copyright (c) CERN, 2025. #
44
########################################### #
55

6+
import os
67
import shutil
78
import tarfile
89
import time
910
from pathlib import Path
1011

12+
from xaux import FsPath
13+
1114
import numpy as np
1215
import pandas as pd
1316
import pytest
@@ -21,9 +24,9 @@
2124
class TestConfig:
2225
"""Configuration constants for submission and retrieval tests."""
2326

24-
TEST_ACCOUNT = "testuser"
27+
TEST_ACCOUNT = os.getlogin()
2528
# Directory paths
26-
BASE_DIR = Path(f"/afs/cern.ch/user/{TEST_ACCOUNT[0]}/{TEST_ACCOUNT}/test_xboinc")
29+
BASE_DIR = FsPath(f"/afs/cern.ch/user/{TEST_ACCOUNT[0]}/{TEST_ACCOUNT}/test_xboinc")
2730
INPUT_DIR = BASE_DIR / "input_dev"
2831
OUTPUT_DIR = BASE_DIR / "output_dev"
2932

0 commit comments

Comments
 (0)