Skip to content
Snippets Groups Projects
Commit fdb46c54 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'f-no-automatic-file-naming' into 'dev'

ENH: Test for issue caosdb-server#192 (automatic name for mass-imported File entities)

See merge request !57
parents c2e87a34 6de54087
No related branches found
No related tags found
1 merge request!57ENH: Test for issue caosdb-server#192 (automatic name for mass-imported File entities)
Pipeline #35139 failed
...@@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
xfail until xfail until
[caosdb-pylib#34](https://gitlab.com/caosdb/caosdb-pylib/-/issues/34) [caosdb-pylib#34](https://gitlab.com/caosdb/caosdb-pylib/-/issues/34)
is fixed. is fixed.
* Test for [caosdb-server#197](https://gitlab.com/caosdb/caosdb-server/-/issues/197).
### Deprecated (for soon-to-be removed features) ### Deprecated (for soon-to-be removed features)
......
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Fitschen
given-names: Timm
orcid: https://orcid.org/0000-0002-4022-432X
- family-names: Schlemmer
given-names: Alexander
orcid: https://orcid.org/0000-0003-4124-9649
- family-names: Hornung
given-names: Daniel
orcid: https://orcid.org/0000-0002-7846-6375
- family-names: tom Wörden
given-names: Henrik
orcid: https://orcid.org/0000-0002-5549-578X
- family-names: Spreckelsen
given-names: Florian
orcid: https://orcid.org/0000-0002-6856-2910
- family-names: Parlitz
given-names: Ulrich
orcid: https://orcid.org/0000-0003-3058-1435
- family-names: Luther
given-names: Stefan
orcid: https://orcid.org/0000-0001-7214-8125
title: "CaosDB - Server"
version: 0.8.1
doi: 10.3390/data4020083
date-released: 2022-11-07
...@@ -16,6 +16,7 @@ CaosDB project. ...@@ -16,6 +16,7 @@ CaosDB project.
- Modify `pycaosdb.ini.template` and save it as `pycaosdb.ini`, taking care of the following points: - Modify `pycaosdb.ini.template` and save it as `pycaosdb.ini`, taking care of the following points:
- Certificates must be valid and be specified in `pycaosdb.ini`. - Certificates must be valid and be specified in `pycaosdb.ini`.
- Server-side scripting paths must be given, otherwise server-side scripting will be omitted. - Server-side scripting paths must be given, otherwise server-side scripting will be omitted.
- Paths for the file tests must exist, or be creatable by the testing script and the server.
- Run the tests with `pytest` or `pytest-3` (depending on your system). - Run the tests with `pytest` or `pytest-3` (depending on your system).
- If you want to run just a single test, you can also select a single test file: - If you want to run just a single test, you can also select a single test file:
`pytest-3 tests/test_issues.py` `pytest-3 tests/test_issues.py`
...@@ -65,7 +66,7 @@ when creating the merge request. This allows our team to work with you on your r ...@@ -65,7 +66,7 @@ when creating the merge request. This allows our team to work with you on your r
* Copyright (C) 2018 Research Group Biomedical Physics, Max Planck Institute * Copyright (C) 2018 Research Group Biomedical Physics, Max Planck Institute
for Dynamics and Self-Organization Göttingen. for Dynamics and Self-Organization Göttingen.
* Copyright (C) 2020-2021 Indiscale GmbH <info@indiscale.com> * Copyright (C) 2020-2023 Indiscale GmbH <info@indiscale.com>
All files in this repository are licensed under the [GNU Affero General Public All files in this repository are licensed under the [GNU Affero General Public
License](LICENCE.md) (version 3 or later). License](LICENCE.md) (version 3 or later).
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
# #
# Copyright (C) 2018 Research Group Biomedical Physics, # Copyright (C) 2018 Research Group Biomedical Physics,
# Max-Planck-Institute for Dynamics and Self-Organization Göttingen # Max-Planck-Institute for Dynamics and Self-Organization Göttingen
# Copyright (C) 2019 IndiScale GmbH (info@indiscale.com) # Copyright (C) 2019-2023 IndiScale GmbH (info@indiscale.com)
# Copyright (C) 2019 Daniel Hornung (d.hornung@indiscale.com) # Copyright (C) 2019-2023 Daniel Hornung (d.hornung@indiscale.com)
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
...@@ -536,7 +536,7 @@ def test_insert_files_in_dir_with_symlink(): ...@@ -536,7 +536,7 @@ def test_insert_files_in_dir_with_symlink():
assert_is_not_none(c.messages["Info", 0]) assert_is_not_none(c.messages["Info", 0])
assert_equal(c.messages["Info", 0][0], assert_equal(c.messages["Info", 0][0],
"Files count in linked_subfolder/: 1") "Files count in linked_subfolder/: 1")
assert_equal(c[0].name, "test2.dat") assert c[0].name is None
assert_equal(c[0].path, "/linked_subfolder/test2.dat") assert_equal(c[0].path, "/linked_subfolder/test2.dat")
d = models.Container() d = models.Container()
...@@ -551,7 +551,7 @@ def test_insert_files_in_dir_with_symlink(): ...@@ -551,7 +551,7 @@ def test_insert_files_in_dir_with_symlink():
assert_equal(d.messages["Info", 0][0], assert_equal(d.messages["Info", 0][0],
"Files count in linked_subfolder/: 1") "Files count in linked_subfolder/: 1")
assert_true(d[0].is_valid()) assert_true(d[0].is_valid())
assert_equal(d[0].name, "test2.dat") assert d[0].name is None
assert_equal(d[0].path, "/linked_subfolder/test2.dat") assert_equal(d[0].path, "/linked_subfolder/test2.dat")
finally: finally:
...@@ -633,7 +633,7 @@ def test_insert_files_in_dir(): ...@@ -633,7 +633,7 @@ def test_insert_files_in_dir():
# only the new file is given back... # only the new file is given back...
assert_equal(1, len(e)) assert_equal(1, len(e))
assert_false(e[0].is_valid()) assert_false(e[0].is_valid())
assert_equal(e[0].name, "test3.dat") assert e[0].name is None
assert_equal(e[0].path, "/testfolder/test3.dat") assert_equal(e[0].path, "/testfolder/test3.dat")
f = models.Container() f = models.Container()
...@@ -648,7 +648,7 @@ def test_insert_files_in_dir(): ...@@ -648,7 +648,7 @@ def test_insert_files_in_dir():
# only the new file is given back... # only the new file is given back...
assert_equal(1, len(f)) assert_equal(1, len(f))
assert_true(f[0].is_valid()) assert_true(f[0].is_valid())
assert_equal(f[0].name, "test3.dat") assert f[0].name is None
assert_equal(f[0].path, "/testfolder/test3.dat") assert_equal(f[0].path, "/testfolder/test3.dat")
finally: finally:
...@@ -700,7 +700,7 @@ def test_insert_files_in_dir_regex(): ...@@ -700,7 +700,7 @@ def test_insert_files_in_dir_regex():
# the other has been inserted # the other has been inserted
assert len(c) == 1 assert len(c) == 1
assert c[0].name == "test_insert.dat" assert c[0].name is None
finally: finally:
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment