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
ea43d97c
Commit
ea43d97c
authored
13 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
LMS-2250 test fixed
SVN: 21326
parent
97918064
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
openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java
+25
-27
25 additions, 27 deletions
.../systemsx/cisd/openbis/generic/server/ETLServiceTest.java
with
25 additions
and
27 deletions
openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java
+
25
−
27
View file @
ea43d97c
...
@@ -59,6 +59,9 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleC
...
@@ -59,6 +59,9 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleC
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.SourceType
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.SourceType
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.builders.DataSetBuilder
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.builders.DataStoreBuilder
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.builders.ExperimentBuilder
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.AtomicEntityOperationDetails
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.AtomicEntityOperationDetails
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.AtomicEntityOperationResult
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.AtomicEntityOperationResult
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.DataSetTypePE
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.DataSetTypePE
;
...
@@ -96,8 +99,10 @@ public class ETLServiceTest extends AbstractServerTestCase
...
@@ -96,8 +99,10 @@ public class ETLServiceTest extends AbstractServerTestCase
private
static
final
String
DOWNLOAD_URL
=
"download-url"
;
private
static
final
String
DOWNLOAD_URL
=
"download-url"
;
private
static
final
Stri
ng
DSS_
CODE
=
"my-dss"
;
private
static
final
lo
ng
DSS_
ID
=
137L
;
private
static
final
String
DSS_CODE
=
"my-dss"
;
private
static
final
String
DSS_SESSION_TOKEN
=
"dss42"
;
private
static
final
String
DSS_SESSION_TOKEN
=
"dss42"
;
private
static
final
int
PORT
=
443
;
private
static
final
int
PORT
=
443
;
...
@@ -129,19 +134,25 @@ public class ETLServiceTest extends AbstractServerTestCase
...
@@ -129,19 +134,25 @@ public class ETLServiceTest extends AbstractServerTestCase
{
{
one
(
dataStoreDAO
).
tryToFindDataStoreByCode
(
DSS_CODE
);
one
(
dataStoreDAO
).
tryToFindDataStoreByCode
(
DSS_CODE
);
DataStorePE
store
=
new
DataStorePE
();
DataStorePE
store
=
new
DataStorePE
();
store
.
setId
(
DSS_ID
);
store
.
setCode
(
DSS_CODE
);
store
.
setCode
(
DSS_CODE
);
will
(
returnValue
(
store
));
will
(
returnValue
(
store
));
one
(
boFactory
).
createExternalDataTable
(
SESSION
);
one
(
boFactory
).
createDatasetLister
(
SESSION
);
will
(
returnValue
(
externalDataTable
));
will
(
returnValue
(
datasetLister
));
one
(
externalDataTable
).
loadByDataStore
(
store
);
one
(
datasetLister
).
listByDataStore
(
DSS_ID
);
one
(
externalDataTable
).
getExternalData
();
DataSetBuilder
ds1
=
ExternalDataPE
ds1
=
dataSet
(
1
);
new
DataSetBuilder
().
type
(
"my-type"
)
ds1
.
setShareId
(
"share-1"
);
.
code
(
"ds-1"
)
ds1
.
setLocation
(
"loc-a"
);
.
location
(
"loc-a"
)
ds1
.
setSize
(
4711L
);
.
shareID
(
"share-1"
)
will
(
returnValue
(
Arrays
.
asList
(
ds1
,
dataSet
(
2
))));
.
size
(
4711L
)
.
store
(
new
DataStoreBuilder
(
DSS_CODE
).
getStore
())
.
experiment
(
new
ExperimentBuilder
().
identifier
(
"DB:/G1/P/EXP1"
)
.
getExperiment
());
will
(
returnValue
(
Arrays
.
asList
(
ds1
.
getDataSet
())));
}
}
});
});
...
@@ -149,6 +160,7 @@ public class ETLServiceTest extends AbstractServerTestCase
...
@@ -149,6 +160,7 @@ public class ETLServiceTest extends AbstractServerTestCase
createService
().
listDataSets
(
SESSION_TOKEN
,
DSS_CODE
);
createService
().
listDataSets
(
SESSION_TOKEN
,
DSS_CODE
);
assertEquals
(
DSS_CODE
,
dataSets
.
get
(
0
).
getDataStoreCode
());
assertEquals
(
DSS_CODE
,
dataSets
.
get
(
0
).
getDataStoreCode
());
assertEquals
(
"my-type"
,
dataSets
.
get
(
0
).
getDataSetType
());
assertEquals
(
"ds-1"
,
dataSets
.
get
(
0
).
getDataSetCode
());
assertEquals
(
"ds-1"
,
dataSets
.
get
(
0
).
getDataSetCode
());
assertEquals
(
"share-1"
,
dataSets
.
get
(
0
).
getDataSetShareId
());
assertEquals
(
"share-1"
,
dataSets
.
get
(
0
).
getDataSetShareId
());
assertEquals
(
"loc-a"
,
dataSets
.
get
(
0
).
getDataSetLocation
());
assertEquals
(
"loc-a"
,
dataSets
.
get
(
0
).
getDataSetLocation
());
...
@@ -156,25 +168,11 @@ public class ETLServiceTest extends AbstractServerTestCase
...
@@ -156,25 +168,11 @@ public class ETLServiceTest extends AbstractServerTestCase
assertEquals
(
"EXP1"
,
dataSets
.
get
(
0
).
getExperimentCode
());
assertEquals
(
"EXP1"
,
dataSets
.
get
(
0
).
getExperimentCode
());
assertEquals
(
"P"
,
dataSets
.
get
(
0
).
getProjectCode
());
assertEquals
(
"P"
,
dataSets
.
get
(
0
).
getProjectCode
());
assertEquals
(
"G1"
,
dataSets
.
get
(
0
).
getGroupCode
());
assertEquals
(
"G1"
,
dataSets
.
get
(
0
).
getGroupCode
());
assertEquals
(
2
,
dataSets
.
size
());
assertEquals
(
"DB"
,
dataSets
.
get
(
0
).
getDatabaseInstanceCode
());
assertEquals
(
1
,
dataSets
.
size
());
context
.
assertIsSatisfied
();
context
.
assertIsSatisfied
();
}
}
private
ExternalDataPE
dataSet
(
long
id
)
{
ExternalDataPE
dataSet
=
new
ExternalDataPE
();
dataSet
.
setId
(
id
);
DataStorePE
store
=
new
DataStorePE
();
store
.
setCode
(
DSS_CODE
);
dataSet
.
setDataStore
(
store
);
dataSet
.
setCode
(
"ds-"
+
id
);
DataSetTypePE
dataSetType
=
new
DataSetTypePE
();
dataSetType
.
setCode
(
"my-type"
);
dataSet
.
setDataSetType
(
dataSetType
);
dataSet
.
setExperiment
(
createExperiment
(
"TYPE"
,
"EXP1"
,
"G1"
));
return
dataSet
;
}
@Test
@Test
public
void
testRegisterDataStoreServer
()
public
void
testRegisterDataStoreServer
()
{
{
...
...
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