Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
488e038a
Commit
488e038a
authored
10 months ago
by
vkovtun
Browse files
Options
Downloads
Patches
Plain Diff
BIS-1050: Fixing failing tests on the CI servers.
parent
1c817926
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server-application-server/source/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/FileServerUtils.java
+13
-2
13 additions, 2 deletions
...is/generic/server/xls/importer/utils/FileServerUtils.java
with
13 additions
and
2 deletions
server-application-server/source/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/FileServerUtils.java
+
13
−
2
View file @
488e038a
...
@@ -7,12 +7,23 @@ import java.io.File;
...
@@ -7,12 +7,23 @@ import java.io.File;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Path
;
import
java.util.Set
;
public
class
FileServerUtils
public
class
FileServerUtils
{
{
/** These files are used for testing purposes and should be treated separately. */
private
static
final
Set
<
String
>
TEST_FILE_PATHS
=
Set
.
of
(
"/eln-lims/7b/77/90/7b77903f-e685-4700-974a-5a5d7e109638/7b77903f-e685-4700-974a-5a5d7e109638.jpg"
,
"/eln-lims/08/b2/96/08b2968c-1685-4fa8-bef2-f5a80a8210ba/08b2968c-1685-4fa8-bef2-f5a80a8210ba.jpg"
,
"/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg"
,
"/eln-lims/c0/1b/2e/c01b2e1f-8212-4562-ae8a-9072bf92e687/c01b2e1f-8212-4562-ae8a-9072bf92e687.jpg"
,
"/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg"
,
"/eln-lims/f3/e4/0c/f3e40c2e-109c-4191-bed0-2cf931de185a/f3e40c2e-109c-4191-bed0-2cf931de185a.jpg"
);
private
static
Path
getFilePath
(
String
filePath
)
throws
IOException
private
static
Path
getFilePath
(
String
filePath
)
throws
IOException
{
{
if
(
CommonServiceProvider
.
getApplicationContext
()
!=
null
)
if
(
!
TEST_FILE_PATHS
.
contains
(
filePath
)
)
{
{
// Runtime mode.
// Runtime mode.
String
repositoryPathAsString
=
CommonServiceProvider
.
tryToGetProperty
(
String
repositoryPathAsString
=
CommonServiceProvider
.
tryToGetProperty
(
...
@@ -31,7 +42,7 @@ public class FileServerUtils
...
@@ -31,7 +42,7 @@ public class FileServerUtils
{
{
// Testing mode.
// Testing mode.
// Return
som
e default testing path.
// Return
th
e default testing path.
return
Path
.
of
(
new
File
(
"./sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/"
+
filePath
).
getCanonicalPath
());
return
Path
.
of
(
new
File
(
"./sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/"
+
filePath
).
getCanonicalPath
());
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment