Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a tmp dir does not need a scnd random var
Browse files Browse the repository at this point in the history
ReimarBauer committed Jan 27, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d73f7b1 commit c82f69d
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions tests/constants.py
Original file line number Diff line number Diff line change
@@ -28,30 +28,13 @@
import os
import fs
import tempfile
import logging
from fs.tempfs import TempFS

try:
import git
except ImportError:
SHA = ""
else:
path = os.path.dirname(os.path.realpath(__file__))
repo = git.Repo(path, search_parent_directories=True)
logging.debug(path)
try:
# this is for local development important to get a fresh named tmpdir
SHA = repo.head.object.hexsha[0:10]
except (ValueError, BrokenPipeError) as ex:
logging.debug("Unknown Problem: %s", ex)
# mounted dir in docker container and owner is not root
SHA = ""

CACHED_CONFIG_FILE = None
SERVER_CONFIG_FILE = "mswms_settings.py"
MSCOLAB_CONFIG_FILE = "mscolab_settings.py"
MSCOLAB_AUTH_FILE = "mscolab_auth.py"
ROOT_FS = TempFS(identifier=f"msui{SHA}")
ROOT_FS = TempFS(identifier=f"msui")
OSFS_URL = ROOT_FS.geturl("", purpose="fs")

ROOT_DIR = ROOT_FS.getsyspath("")

0 comments on commit c82f69d

Please sign in to comment.