Ejemplo n.º 1
0
 def testInstallWithExistingInstallationShouldPreserveOldValuesInIndicoConf(self):
     self.testInstallShouldWork()
     # we modify installed indico.conf
     modifyOnDiskIndicoConfOption('%s/indico.conf' % TESTCONFIGURATIONDIR, 'DBConnectionParams', ("localhost", 9676))
     retcode = call([sys.executable, 'setup.py', 'install', '--force-upgrade', '--root', TESTSITEPACKAGES, '--uid', str(os.getuid()), '--gid', str(os.getgid())], stdout=self._stdout, stdin=self._stdin)
     self.assertEqual(0, retcode)
     self.assertNotEqual(-1, file('%s/indico.conf' % TESTCONFIGURATIONDIR).read().find('(\'localhost\', 9676)'))
Ejemplo n.º 2
0
    def testSmtpUseTLS(self):
        self.testGetInstanceShouldWork()

        modifyOnDiskIndicoConfOption("etc/indico.conf.local", "SmtpUseTLS", "no")
        self.config.forceReload()
        self.assertEquals(False, self.config.getSmtpUseTLS())

        modifyOnDiskIndicoConfOption("etc/indico.conf.local", "SmtpUseTLS", "yes")
        self.config.forceReload()
        self.assertEquals(True, self.config.getSmtpUseTLS())
Ejemplo n.º 3
0
    def testSmtpUseTLS(self):
        self.testGetInstanceShouldWork()

        modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'SmtpUseTLS', 'no')
        self.config.forceReload()
        self.assertEquals(False, self.config.getSmtpUseTLS())

        modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'SmtpUseTLS', 'yes')
        self.config.forceReload()
        self.assertEquals(True, self.config.getSmtpUseTLS())
Ejemplo n.º 4
0
    def testSmtpUseTLS(self):
        self.testGetInstanceShouldWork()

        modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'SmtpUseTLS', 'no')
        self.config.forceReload()
        self.assertEquals(False, self.config.getSmtpUseTLS())

        modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'SmtpUseTLS', 'yes')
        self.config.forceReload()
        self.assertEquals(True, self.config.getSmtpUseTLS())
Ejemplo n.º 5
0
 def testInstallShouldWork(self):
     modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'ConfigurationDir', TESTCONFIGURATIONDIR)
     modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'BinDir', TESTBINDIR)
     modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'DocumentationDir', TESTDOCUMENTATIONDIR)
     modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'HtdocsDir', TESTHTDOCSDIR)
     retcode = call([sys.executable, 'setup.py', 'install', '--root', TESTSITEPACKAGES, '--uid', str(os.getuid()), '--gid', str(os.getgid())], stdout=self._stdout, stdin=self._stdin)
     self.assertEqual(0, retcode)
     assert(os.path.exists('%s/indico.conf' % TESTCONFIGURATIONDIR))
Ejemplo n.º 6
0
 def testInstallWithExistingInstallationShouldPreserveOldValuesInIndicoConf(
         self):
     self.testInstallShouldWork()
     # we modify installed indico.conf
     modifyOnDiskIndicoConfOption('%s/indico.conf' % TESTCONFIGURATIONDIR,
                                  'DBConnectionParams', ("localhost", 9676))
     retcode = call([
         sys.executable, 'setup.py', 'install', '--force-upgrade', '--root',
         TESTSITEPACKAGES, '--uid',
         str(os.getuid()), '--gid',
         str(os.getgid())
     ],
                    stdout=self._stdout,
                    stdin=self._stdin)
     self.assertEqual(0, retcode)
     self.assertNotEqual(
         -1,
         file('%s/indico.conf' %
              TESTCONFIGURATIONDIR).read().find('(\'localhost\', 9676)'))
Ejemplo n.º 7
0
 def testInstallShouldWork(self):
     modifyOnDiskIndicoConfOption('etc/indico.conf.local',
                                  'ConfigurationDir', TESTCONFIGURATIONDIR)
     modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'BinDir',
                                  TESTBINDIR)
     modifyOnDiskIndicoConfOption('etc/indico.conf.local',
                                  'DocumentationDir', TESTDOCUMENTATIONDIR)
     modifyOnDiskIndicoConfOption('etc/indico.conf.local', 'HtdocsDir',
                                  TESTHTDOCSDIR)
     retcode = call([
         sys.executable, 'setup.py', 'install', '--root', TESTSITEPACKAGES,
         '--uid',
         str(os.getuid()), '--gid',
         str(os.getgid())
     ],
                    stdout=self._stdout,
                    stdin=self._stdin)
     self.assertEqual(0, retcode)
     assert (os.path.exists('%s/indico.conf' % TESTCONFIGURATIONDIR))