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
8457df46
Commit
8457df46
authored
14 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
LMS-1909 Fixed tests.
SVN: 19069
parent
2249513d
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
datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/entityregistration/SampleAndDatasetRegistrationHandlerTest.java
+10
-3
10 additions, 3 deletions
...registration/SampleAndDatasetRegistrationHandlerTest.java
with
10 additions
and
3 deletions
datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/entityregistration/SampleAndDatasetRegistrationHandlerTest.java
+
10
−
3
View file @
8457df46
...
@@ -115,7 +115,7 @@ public class SampleAndDatasetRegistrationHandlerTest extends AbstractFileSystemT
...
@@ -115,7 +115,7 @@ public class SampleAndDatasetRegistrationHandlerTest extends AbstractFileSystemT
+
"Folder contents:\n"
+
"\t.svn\n"
+
"\tnot-a-tsv.txt\n"
;
+
"Folder contents:\n"
+
"\t.svn\n"
+
"\tnot-a-tsv.txt\n"
;
// Check the log
// Check the log
assertEquals
(
errorText
+
"\nDeleting file 'no-control'."
,
logAppender
.
getLogContent
()
);
checkAppenderContent
(
errorText
,
"no-control"
);
checkEmailContent
(
attachmentMatcher
,
addressesMatcher
,
errorText
);
checkEmailContent
(
attachmentMatcher
,
addressesMatcher
,
errorText
);
...
@@ -144,8 +144,7 @@ public class SampleAndDatasetRegistrationHandlerTest extends AbstractFileSystemT
...
@@ -144,8 +144,7 @@ public class SampleAndDatasetRegistrationHandlerTest extends AbstractFileSystemT
"Folder (empty-folder) for sample/dataset registration contains no control files with the required extension: .tsv.\n"
"Folder (empty-folder) for sample/dataset registration contains no control files with the required extension: .tsv.\n"
+
"Folder contents:\n"
+
"\t.svn\n"
;
+
"Folder contents:\n"
+
"\t.svn\n"
;
// Check the log
// Check the log
assertEquals
(
errorText
+
"\n"
+
"Deleting file 'empty-folder'."
,
checkAppenderContent
(
errorText
,
"empty-folder"
);
logAppender
.
getLogContent
());
// Check the email
// Check the email
checkEmailContent
(
attachmentMatcher
,
addressesMatcher
,
errorText
);
checkEmailContent
(
attachmentMatcher
,
addressesMatcher
,
errorText
);
...
@@ -232,4 +231,12 @@ public class SampleAndDatasetRegistrationHandlerTest extends AbstractFileSystemT
...
@@ -232,4 +231,12 @@ public class SampleAndDatasetRegistrationHandlerTest extends AbstractFileSystemT
assertEquals
(
errorText
,
attachmentMatcher
.
getRecordedObjects
().
get
(
0
).
getContent
());
assertEquals
(
errorText
,
attachmentMatcher
.
getRecordedObjects
().
get
(
0
).
getContent
());
}
}
private
void
checkAppenderContent
(
String
errorText
,
String
folderName
)
{
boolean
matches
=
logAppender
.
getLogContent
().
startsWith
(
errorText
);
assertTrue
(
"Log does not contain correct text"
,
matches
);
// assertEquals(errorText + "\nDeleting file '" + folderName + "'.",
// logAppender.getLogContent());
}
}
}
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