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
ac034552
Commit
ac034552
authored
8 years ago
by
gakin
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-4847 : Add master data sync to the integration test
SVN: 37846
parent
90a7b371
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
integration-tests/templates/test_openbis_sync/master_data/initialize-master-data.py
+1
-1
1 addition, 1 deletion
...s/test_openbis_sync/master_data/initialize-master-data.py
integration-tests/test_openbis_sync.py
+21
-3
21 additions, 3 deletions
integration-tests/test_openbis_sync.py
with
22 additions
and
4 deletions
integration-tests/templates/test_openbis_sync/master_data/initialize-master-data.py
+
1
−
1
View file @
ac034552
...
@@ -22,7 +22,7 @@ vocabulary_term_GENDER_FEMALE.setLabel('FEMALE')
...
@@ -22,7 +22,7 @@ vocabulary_term_GENDER_FEMALE.setLabel('FEMALE')
vocabulary_term_GENDER_FEMALE
.
setOrdinal
(
1
)
vocabulary_term_GENDER_FEMALE
.
setOrdinal
(
1
)
vocabulary_GENDER
.
addTerm
(
vocabulary_term_GENDER_FEMALE
)
vocabulary_GENDER
.
addTerm
(
vocabulary_term_GENDER_FEMALE
)
vocabulary_INTERNAL
=
tr
.
getOrCreateNewVocabulary
(
'
NTERNAL
'
)
vocabulary_INTERNAL
=
tr
.
getOrCreateNewVocabulary
(
'
I
NTERNAL
'
)
vocabulary_INTERNAL
.
setDescription
(
'
Internal vocabulary
'
)
vocabulary_INTERNAL
.
setDescription
(
'
Internal vocabulary
'
)
vocabulary_INTERNAL
.
setUrlTemplate
(
None
)
vocabulary_INTERNAL
.
setUrlTemplate
(
None
)
vocabulary_INTERNAL
.
setManagedInternally
(
False
)
vocabulary_INTERNAL
.
setManagedInternally
(
False
)
...
...
This diff is collapsed.
Click to expand it.
integration-tests/test_openbis_sync.py
+
21
−
3
View file @
ac034552
...
@@ -41,10 +41,17 @@ class TestCase(systemtest.testcase.TestCase):
...
@@ -41,10 +41,17 @@ class TestCase(systemtest.testcase.TestCase):
openbis1
.
createTestDatabase
(
'
openbis
'
)
openbis1
.
createTestDatabase
(
'
openbis
'
)
openbis1
.
createTestDatabase
(
'
pathinfo
'
)
openbis1
.
createTestDatabase
(
'
pathinfo
'
)
openbis1
.
createTestDatabase
(
'
imaging
'
)
openbis1
.
createTestDatabase
(
'
imaging
'
)
'''
Set openbis1 as the datasource
'''
'''
Set openbis1 as the datasource
'''
self
.
installDataSourcePlugin
(
openbis1
,
openbis1_dss_port
)
self
.
installDataSourcePlugin
(
openbis1
,
openbis1_dss_port
)
self
.
installEntityRegistrationPlugin
(
openbis1
)
self
.
installEntityRegistrationPlugin
(
openbis1
)
'''
Copy master data script
'''
filePath
=
"
%s/servers/core-plugins/%s/1/as
"
%
(
openbis1
.
installPath
,
openbis1
.
instanceName
)
os
.
makedirs
(
filePath
)
util
.
printAndFlush
(
"
Copying master data script from %s to %s
"
%
(
self
.
getMasterDataScriptFolder
(),
filePath
))
util
.
copyFromTo
(
self
.
getMasterDataScriptFolder
(),
filePath
,
"
initialize-master-data.py
"
)
corePluginsPropertiesFile
=
"
%s/servers/core-plugins/core-plugins.properties
"
%
openbis1
.
installPath
corePluginsPropertiesFile
=
"
%s/servers/core-plugins/core-plugins.properties
"
%
openbis1
.
installPath
util
.
printAndFlush
(
corePluginsPropertiesFile
)
util
.
printAndFlush
(
corePluginsPropertiesFile
)
openbis1
.
allUp
()
openbis1
.
allUp
()
...
@@ -115,6 +122,13 @@ class TestCase(systemtest.testcase.TestCase):
...
@@ -115,6 +122,13 @@ class TestCase(systemtest.testcase.TestCase):
openbis1
.
setDummyAuthentication
()
openbis1
.
setDummyAuthentication
()
self
.
installDataSourcePlugin
(
openbis1
,
openbis1_dss_port
)
self
.
installDataSourcePlugin
(
openbis1
,
openbis1_dss_port
)
self
.
installEntityRegistrationPlugin
(
openbis1
)
self
.
installEntityRegistrationPlugin
(
openbis1
)
'''
Copy master data script
'''
filePath
=
"
%s/servers/core-plugins/%s/1/as
"
%
(
openbis1
.
installPath
,
openbis1
.
instanceName
)
os
.
makedirs
(
filePath
)
util
.
printAndFlush
(
"
Copying master data script from %s to %s
"
%
(
self
.
getMasterDataScriptFolder
(),
filePath
))
util
.
copyFromTo
(
self
.
getMasterDataScriptFolder
(),
filePath
,
"
initialize-master-data.py
"
)
corePluginsPropertiesFile
=
"
%s/servers/core-plugins/core-plugins.properties
"
%
openbis1
.
installPath
corePluginsPropertiesFile
=
"
%s/servers/core-plugins/core-plugins.properties
"
%
openbis1
.
installPath
util
.
printAndFlush
(
corePluginsPropertiesFile
)
util
.
printAndFlush
(
corePluginsPropertiesFile
)
#util.writeProperties(corePluginsPropertiesFile)
#util.writeProperties(corePluginsPropertiesFile)
...
@@ -122,7 +136,8 @@ class TestCase(systemtest.testcase.TestCase):
...
@@ -122,7 +136,8 @@ class TestCase(systemtest.testcase.TestCase):
openbis1
.
setDataStoreServerProperty
(
"
host-address
"
,
"
https://localhost
"
)
openbis1
.
setDataStoreServerProperty
(
"
host-address
"
,
"
https://localhost
"
)
openbis1
.
allUp
()
openbis1
.
allUp
()
'''
uncomment the following if we have ot run the test once in non-dev mode before (otherwise we already have ENTITY_REGISTRATION and get an error
'''
'''
uncomment the following if we have not run the test once in non-dev mode before (otherwise we already have ENTITY_REGISTRATION and get an error
'''
# '''Drop the folder to register some test entities in space SYNC'''
# '''Drop the folder to register some test entities in space SYNC'''
# openbis1.dropAndWait("ENTITY_REGISTRATION", "openbis-sync-entity-reg")
# openbis1.dropAndWait("ENTITY_REGISTRATION", "openbis-sync-entity-reg")
...
@@ -230,12 +245,15 @@ class TestCase(systemtest.testcase.TestCase):
...
@@ -230,12 +245,15 @@ class TestCase(systemtest.testcase.TestCase):
def
installEntityRegistrationPlugin
(
self
,
openbisController
):
def
installEntityRegistrationPlugin
(
self
,
openbisController
):
self
.
installPlugin
(
openbisController
,
"
test
"
)
self
.
installPlugin
(
openbisController
,
"
test
"
)
def
installHarvesterPlugin
(
self
,
openbisController
):
def
installHarvesterPlugin
(
self
,
openbisController
):
self
.
installPlugin
(
openbisController
,
"
harvester
"
)
self
.
installPlugin
(
openbisController
,
"
harvester
"
)
def
getHarvesterConfigFolder
(
self
):
def
getHarvesterConfigFolder
(
self
):
return
systemtest
.
testcase
.
TEMPLATES
+
"
/
"
+
self
.
name
+
"
/harvester_config
"
return
systemtest
.
testcase
.
TEMPLATES
+
"
/
"
+
self
.
name
+
"
/harvester_config
"
def
getMasterDataScriptFolder
(
self
):
return
systemtest
.
testcase
.
TEMPLATES
+
"
/
"
+
self
.
name
+
"
/master_data
"
class
GitLabArtifactRepository
(
GitArtifactRepository
):
class
GitLabArtifactRepository
(
GitArtifactRepository
):
"""
"""
...
...
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