Skip to content
Snippets Groups Projects
Commit ac034552 authored by gakin's avatar gakin
Browse files

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
...@@ -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('INTERNAL')
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)
......
...@@ -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):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment