コード例 #1
0
 def test_build_packages(self, register_webhook):
     '''This test perform a package addtion and check whether a build
      started for the same.
      1. Create a session cookie for given user. We are using a existing
            # user 'brandon' which is already added as fixture.
      2. Try to create a package.
      3. Poll the task for package creation. Polling should start the build
      4. Verify that Building started and it is visible via GUI'''
     sourcePage = SourcePage(self.driver)
     self.create_login_session('brandon')
     # test whether sources page opens after user logs in
     sourcePage.driver.get(self.live_server_url)
     sourcePage.sources_button.click()
     git_url = "https://github.com/aaSemble/python-aasemble.django.git"
     sourcePage.create_new_package_source(git_url=git_url, branch='master', series='brandon/aasemble')
     self.assertEqual(sourcePage.verify_package_source(git_url=git_url), True, 'Package not created')
     from .models import PackageSource
     # Only one package is added with this url
     P = PackageSource.objects.filter(git_url=git_url)[0]
     try:
         poll_one(P.id)
     except:
         # Marking Pass even if we got some exception during package build.
         # Our verification is limited to UI inteface. Form UI, It should
         # be visible (even if it has just started)
         pass
     finally:
         buildPage = BuildPage(self.driver)
         buildPage.driver.get(self.live_server_url)
         buildPage.build_button.click()
         uuid = str(P.build_set.first().uuid)
         self.assertEqual(buildPage.verify_build_displayed(uuid=uuid), True, 'Build not started')
コード例 #2
0
 def test_build_packages(self):
     '''This test perform a package addtion and check whether a build
     started for the same.
     1. Create a session cookie for given user. We are using a existing
            user 'brandon' which is already added as fixture.
     2. Try to create a package.
     3. Poll the task for package creation. Polling should start the build
     4. Verify that Building started and it is visible via GUI'''
     self.create_login_session('brandon')
     # test whether sources page opens after user logs in
     self.selenium.get('%s%s' % (self.live_server_url, '/buildsvc/sources/'))
     self.selenium.set_window_size(1024, 768)
     self.sources_button.click()
     git_url = "https://github.com/aaSemble/python-aasemble.django.git"
     self.create_new_package_source(git_url=git_url, branch='master', series='brandon/aasemble')
     from .models import PackageSource
     # Only one package is added with this url
     P = PackageSource.objects.filter(git_url=git_url)[0]
     try:
         poll_one(P.id)
     except:
         # Marking Pass even if we got some exception during package build.
         # Our verification is limited to UI inteface. Form UI, It should
         # be visible (even if it has just started)
         pass
     finally:
         self.selenium.get('%s%s' % (self.live_server_url, '/buildsvc/sources/'))
         self.build_button.click()
         self.assertEqual(self.verify_build_displayed(packageName='python-aasemble.django.git'), True, 'Build not started')
コード例 #3
0
 def test_build_packages(self, register_webhook):
     '''This test perform a package addtion and check whether a build
      started for the same.
      1. Create a session cookie for given user. We are using a existing
            # user 'brandon' which is already added as fixture.
      2. Try to create a package.
      3. Poll the task for package creation. Polling should start the build
      4. Verify that Building started and it is visible via GUI'''
     sourcePage = SourcePage(self.driver)
     self.create_login_session('brandon')
     # test whether sources page opens after user logs in
     sourcePage.driver.get(self.live_server_url)
     sourcePage.sources_button.click()
     git_url = "https://github.com/aaSemble/python-aasemble.django.git"
     sourcePage.create_new_package_source(git_url=git_url,
                                          branch='master',
                                          series='brandon/aasemble')
     self.assertEqual(sourcePage.verify_package_source(git_url=git_url),
                      True, 'Package not created')
     from .models import PackageSource
     # Only one package is added with this url
     P = PackageSource.objects.filter(git_url=git_url)[0]
     try:
         poll_one(P.id)
     except:
         # Marking Pass even if we got some exception during package build.
         # Our verification is limited to UI inteface. Form UI, It should
         # be visible (even if it has just started)
         pass
     finally:
         buildPage = BuildPage(self.driver)
         buildPage.driver.get(self.live_server_url)
         buildPage.build_button.click()
         self.assertEqual(
             buildPage.verify_build_displayed(
                 packageName='python-aasemble.django.git'), True,
             'Build not started')