Exemplo n.º 1
0
 def test_extract_release_from_file_content(self):
   b = Bank('local')
   b.load_session(UpdateWorkflow.FLOW)
   b.session.config.set('release.file', 'test_100\.txt')
   b.session.config.set('release.regexp', 'Release\s*(\d+)')
   w = UpdateWorkflow(b)
   w.wf_release()
   self.assertTrue(b.session.get('release') == '103')
Exemplo n.º 2
0
 def test_extract_release_from_file_content(self):
     b = Bank('local')
     b.load_session(UpdateWorkflow.FLOW)
     b.session.config.set('release.file', 'test_100\.txt')
     b.session.config.set('release.regexp', 'Release\s*(\d+)')
     w = UpdateWorkflow(b)
     w.wf_release()
     self.assertTrue(b.session.get('release') == '103')
Exemplo n.º 3
0
 def test_extract_release_from_file_content(self):
     b = Bank("local")
     b.load_session(UpdateWorkflow.FLOW)
     b.session.config.set("release.file", "test_100\.txt")
     b.session.config.set("release.regexp", "Release\s*(\d+)")
     w = UpdateWorkflow(b)
     w.wf_release()
     self.assertTrue(b.session.get("release") == "103")
Exemplo n.º 4
0
    def test_fromscratch_update_with_release(self):
        '''
      Try updating twice, at second time, bank should  be updated (force with fromscratch)

      Use case with release defined in release file
      '''
        b = Bank('local')
        b.load_session(UpdateWorkflow.FLOW)
        b.session.config.set('release.file', 'test_(\d+)\.txt')
        b.session.config.set('release.regexp', '')
        w = UpdateWorkflow(b)
        w.wf_release()
        self.assertTrue(b.session.get('release') == '100')
        os.makedirs(b.session.get_full_release_directory())
        w = UpdateWorkflow(b)
        # Reset release
        b.session.set('release', None)
        w.options.fromscratch = True
        w.wf_release()
        self.assertTrue(b.session.get('release') == '100__1')
Exemplo n.º 5
0
  def test_fromscratch_update_with_release(self):
      '''
      Try updating twice, at second time, bank should  be updated (force with fromscratch)

      Use case with release defined in release file
      '''
      b = Bank('local')
      b.load_session(UpdateWorkflow.FLOW)
      b.session.config.set('release.file', 'test_(\d+)\.txt')
      b.session.config.set('release.regexp', '')
      w = UpdateWorkflow(b)
      w.wf_release()
      self.assertTrue(b.session.get('release') == '100')
      os.makedirs(b.session.get_full_release_directory())
      w = UpdateWorkflow(b)
      # Reset release
      b.session.set('release', None)
      w.options.fromscratch = True
      w.wf_release()
      self.assertTrue(b.session.get('release') == '100__1')
Exemplo n.º 6
0
    def test_fromscratch_update_with_release(self):
        """
      Try updating twice, at second time, bank should  be updated (force with fromscratch)

      Use case with release defined in release file
      """
        b = Bank("local")
        b.load_session(UpdateWorkflow.FLOW)
        b.session.config.set("release.file", "test_(\d+)\.txt")
        b.session.config.set("release.regexp", "")
        w = UpdateWorkflow(b)
        w.wf_release()
        self.assertTrue(b.session.get("release") == "100")
        os.makedirs(b.session.get_full_release_directory())
        w = UpdateWorkflow(b)
        # Reset release
        b.session.set("release", None)
        w.options.fromscratch = True
        w.wf_release()
        self.assertTrue(b.session.get("release") == "100__1")
Exemplo n.º 7
0
 def start_update(self):
     '''
     Start an update workflow
     '''
     workflow = UpdateWorkflow(self)
     return workflow.start()
Exemplo n.º 8
0
 def start_update(self):
     '''
     Start an update workflow
     '''
     workflow = UpdateWorkflow(self)
     return workflow.start()
Exemplo n.º 9
0
 def start_update(self):
     """
     Start an update workflow
     """
     workflow = UpdateWorkflow(self)
     return workflow.start()