def setUp(self): self.db_fd, self.db_file = mkstemp() self.cef_fd, self.cef_file = mkstemp() app.config['DEBUG'] = True app.config['CSRF_ENABLED'] = False app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///%s' % self.db_file app.config.update(cef_config(self.cef_file)) with app.test_request_context(): db.init_app(app) db.create_all() r = FennecRelease(submitter='joe', version='1', buildNumber=1, branch='a', mozillaRevision='abc', l10nChangesets='af de', dashboardCheck=True, mozillaRelbranch=None) r.ready = True db.session.add(r) r = FennecRelease(submitter='joe', version='4', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='gh ij', dashboardCheck=True, mozillaRelbranch=None) db.session.add(r) r = FennecRelease(submitter='joe', version='4', buildNumber=5, branch='a', mozillaRevision='abc', l10nChangesets='lk mn', dashboardCheck=False, mozillaRelbranch='BAR', submittedAt=datetime(2005, 1, 2, 2, 3, 3, 5)) db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='2', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', dashboardCheck=True, mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazying comment", enUSPlatforms=None) r.complete = True r.ready = True db.session.add(r) r = ThunderbirdRelease(commRevision='ghi', commRelbranch=None, partials='0', promptWaitTime=None, submitter='bob', version='2', buildNumber=2, branch='b', mozillaRevision='ghi', l10nChangesets='li', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), comment='My great comment!', enUSPlatforms="foo bar") r.complete = True r.ready = True db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='4.0', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1)) db.session.add(r) db.session.commit()
def setUp(self): self.cef_fd, self.cef_file = mkstemp() app.config['DEBUG'] = True app.config['CSRF_ENABLED'] = False app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:' app.config.update(cef_config(self.cef_file)) with app.test_request_context(): db.init_app(app) db.create_all() for i, version in enumerate( ('48.0b7', '48.0b8', '48.0b9', '48.0', '48.0.1', '49.0b1', '49.0b2', '49.0b3')): branch = 'releases/mozilla-beta' if 'b' not in version: branch = 'releases/mozilla-release' r = FirefoxRelease( partials='0,1', promptWaitTime=5, submitter='joe', version=version, buildNumber=1, branch=branch, mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2015, 1, i + 1, 3, 4, 5, 6), shippedAt=datetime(2015, 1, i + 1, 7, 8, 9, 0), comment="yet an other amazing comment", description="we did this release because of foo") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = ThunderbirdRelease( commRevision='zzz', commRelbranch=None, partials='0,1', promptWaitTime=5, submitter='joe', version=version, buildNumber=1, branch=branch, mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2015, 1, i + 1, 3, 4, 5, 6), shippedAt=datetime(2015, 1, i + 1, 7, 8, 9, 0), comment="yet an other amazing comment", description="we did this release because of foo") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) db.session.commit()
parser.add_option("--cef-log", dest="cef_log", default="cef.log") options, args = parser.parse_args() log_level = logging.INFO if options.verbose: log_level = logging.DEBUG logging.basicConfig(filename=options.logfile, level=log_level) app.config['SQLALCHEMY_DATABASE_URI'] = options.db app.config['DEBUG'] = True app.config['SECRET_KEY'] = 'NOT A SECRET' app.config.update(cef_config(options.cef_log)) with app.test_request_context(): db.init_app(app) db.create_all() def auth(environ, username, password): return options.username == username and options.password == password if app.config['DEBUG']: # Setting up the cron/ directory with some testing data # In production, this is managed by Apache and the json file is going to be override # by the cron (see bug 1155935) from werkzeug import SharedDataMiddleware app.wsgi_app = SharedDataMiddleware( app.wsgi_app, {'/cron/': path.join(path.dirname(__file__), 'cron/')}) # We serve (at least) a stastic json file from werkzeug import SharedDataMiddleware
def setUp(self): self.cef_fd, self.cef_file = mkstemp() app.config['DEBUG'] = True app.config['CSRF_ENABLED'] = False app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:' app.config.update(cef_config(self.cef_file)) with app.test_request_context(): db.init_app(app) db.create_all() r = FennecRelease( submitter='joe', version='1', buildNumber=1, branch='a', mozillaRevision='abc', l10nChangesets='{"hi": { "revision": "fe436c75f71d" }}', mozillaRelbranch=None) r.ready = True db.session.add(r) r = FennecRelease( submitter='joe', version='4', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='{"fr": { "revision": "fe436c75f71d" }}', mozillaRelbranch=None) db.session.add(r) r = FennecRelease( submitter='joe', version='4', buildNumber=5, branch='a', mozillaRevision='abc', l10nChangesets= '{"de": { "revision": "fe436c75f71d", "platforms": ["android", "android-multilocale"] }}', mozillaRelbranch='BAR', submittedAt=datetime(2005, 1, 2, 2, 3, 3, 5)) db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='2.0', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 4, 3, 4, 5, 6), comment="yet an other amazing comment", mh_changeset='xyz') r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='2.0.2esr', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 4, 3, 4, 5, 6), comment="yet an other amazing comment") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='38.1.0esr', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2015, 1, 4, 3, 4, 5, 6), comment="yet an other amazing comment") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FennecRelease( submitter='joe', version='24.0', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='{"an": { "revision": "fe436c75f71d" }}', submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 3, 1, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FennecRelease( submitter='joe', version='24.0.1', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='{"an": { "revision": "fe436c75f71d" }}', submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 2, 26, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FennecRelease( submitter='joe', version='23.0b2', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='{"an": { "revision": "fe436c75f71d" }}', submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 2, 27, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease( partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b2', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazing comment", isSecurityDriven=True, description="We did this because of an issue in NSS") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b2', buildNumber=2, branch='a', mozillaRevision='defa', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazing comment") db.session.add(r) r = FirefoxRelease( partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b3', buildNumber=1, branch='a', mozillaRevision='defau', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 2, 3, 4, 5, 6, 7), shippedAt=datetime(2005, 2, 3, 4, 5, 6, 7), comment="yet an other amazing comment", isSecurityDriven=True, description="Another beta release for Firefox 3") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease( partials='0,1', promptWaitTime=5, submitter='joe', version='3.0.1', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazing comment", description="we did this release because of foo") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) # Thunderbird data r = ThunderbirdRelease( commRevision='ghi', commRelbranch=None, partials='0', promptWaitTime=None, submitter='bob', version='2', buildNumber=2, branch='b', mozillaRevision='ghi', l10nChangesets='li', mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 1, 3, 1, 1, 1, 1), comment='My great comment!', isSecurityDriven=True, mh_changeset='xyz', description="we did this release because of bar") r.complete = True r.ready = True db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='4.0', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', mozillaRelbranch=None, submittedAt=datetime( 2005, 1, 1, 1, 1, 1, 1), description="foo reason") db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='23.0', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', mozillaRelbranch=None, submittedAt=datetime( 2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 1, 3, 1, 1, 1, 1), description="bar reason") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='23.0.1', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', mozillaRelbranch=None, submittedAt=datetime( 2014, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2014, 2, 3, 1, 1, 1, 1), description="bar2 reason") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='24.0b2', buildNumber=2, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', mozillaRelbranch=None, submittedAt=datetime( 2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 2, 1, 1, 1, 1, 1), description="bar2 reason") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) db.session.commit()
parser = OptionParser() parser.add_option("-d", "--db", dest="db") parser.add_option("--host", dest="host") parser.add_option("--port", dest="port", type="int") parser.add_option("-l", "--logfile", dest="logfile") parser.add_option("-u", "--username", dest="username") parser.add_option("-p", "--password", dest="password") parser.add_option("-v", "--verbose", dest="verbose", action="store_true") parser.add_option("--cef-log", dest="cef_log", default="cef.log") options, args = parser.parse_args() log_level = logging.INFO if options.verbose: log_level = logging.DEBUG logging.basicConfig(filename=options.logfile, level=log_level) app.config['SQLALCHEMY_DATABASE_URI'] = options.db app.config['DEBUG'] = True app.config['SECRET_KEY'] = 'NOT A SECRET' app.config.update(cef_config(options.cef_log)) with app.test_request_context(): db.init_app(app) db.create_all() def auth(environ, username, password): return options.username == username and options.password == password app.wsgi_app = AuthBasicHandler(app.wsgi_app, "Release kick-off", auth) app.run(port=options.port, host=options.host)
def setUp(self): self.cef_fd, self.cef_file = mkstemp() app.config['DEBUG'] = True app.config['CSRF_ENABLED'] = False app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:' app.config.update(cef_config(self.cef_file)) with app.test_request_context(): db.init_app(app) db.create_all() r = FennecRelease(submitter='joe', version='1', buildNumber=1, branch='a', mozillaRevision='abc', l10nChangesets='af de', dashboardCheck=True, mozillaRelbranch=None) r.ready = True db.session.add(r) r = FennecRelease(submitter='joe', version='4', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='gh ij', dashboardCheck=True, mozillaRelbranch=None) db.session.add(r) r = FennecRelease(submitter='joe', version='4', buildNumber=5, branch='a', mozillaRevision='abc', l10nChangesets='lk mn', dashboardCheck=False, mozillaRelbranch='BAR', submittedAt=datetime(2005, 1, 2, 2, 3, 3, 5)) db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='2', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', dashboardCheck=True, mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazying comment", enUSPlatforms=None) r.complete = True r.ready = True db.session.add(r) r = ThunderbirdRelease(commRevision='ghi', commRelbranch=None, partials='0', promptWaitTime=None, submitter='bob', version='2', buildNumber=2, branch='b', mozillaRevision='ghi', l10nChangesets='li', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime( 2005, 1, 1, 1, 1, 1, 1), comment='My great comment!', enUSPlatforms="foo bar") r.complete = True r.ready = True db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='4.0', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime( 2005, 1, 1, 1, 1, 1, 1)) db.session.add(r) db.session.commit()
def setUp(self): self.cef_fd, self.cef_file = mkstemp() app.config['DEBUG'] = True app.config['CSRF_ENABLED'] = False app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:' app.config.update(cef_config(self.cef_file)) with app.test_request_context(): db.init_app(app) db.create_all() r = FennecRelease(submitter='joe', version='1.0', buildNumber=1, branch='a', mozillaRevision='abc', l10nChangesets='{"hi": { "revision": "fe436c75f71d" }}', mozillaRelbranch=None) r.ready = True db.session.add(r) r = FennecRelease(submitter='joe', version='4.0', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='{"fr": { "revision": "fe436c75f71d" }}', mozillaRelbranch=None) db.session.add(r) r = FennecRelease(submitter='joe', version='4.0', buildNumber=5, branch='a', mozillaRevision='abc', l10nChangesets='{"de": { "revision": "fe436c75f71d", "platforms": ["android", "android-multilocale"] }}', mozillaRelbranch='BAR', submittedAt=datetime(2005, 1, 2, 2, 3, 3, 5)) db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='2.0', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 4, 3, 4, 5, 6), comment="yet an other amazing comment", mh_changeset='xyz') r.complete = True r.ready = True r.status = "shipped" db.session.add(r) three_digit_esr_release = FirefoxRelease( partials='0,1', promptWaitTime=5, submitter='joe', version='2.0.2esr', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 4, 3, 4, 5, 6), comment="yet an other amazing comment" ) three_digit_esr_release.complete = True three_digit_esr_release.ready = True three_digit_esr_release.status = "shipped" db.session.add(three_digit_esr_release) two_digit_esr_release = FirefoxRelease( partials='0,1', promptWaitTime=5, submitter='joe', version='38.0esr', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2015, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2015, 1, 4, 3, 4, 5, 6), comment="yet an other amazing comment" ) two_digit_esr_release.complete = True two_digit_esr_release.ready = True two_digit_esr_release.status = "shipped" db.session.add(two_digit_esr_release) r = FennecRelease(submitter='joe', version='24.0', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='{"an": { "revision": "fe436c75f71d" }}', submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 3, 1, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FennecRelease(submitter='joe', version='24.0.1', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='{"an": { "revision": "fe436c75f71d" }}', submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 2, 26, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FennecRelease(submitter='joe', version='23.0b2', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='{"an": { "revision": "fe436c75f71d" }}', submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 2, 27, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='1.0.9', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='legacy', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazing comment", description="we did this release because of foo") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b1', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="Rule with release_eta", description="Rule with release_eta", release_eta=datetime(2005, 1, 2, 3, 4, 5, 7)) r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b2', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazing comment", isSecurityDriven=True, description="We did this because of an issue in NSS") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b2', buildNumber=2, branch='a', mozillaRevision='defa', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazing comment", release_eta=datetime(2005, 1, 2, 3, 4, 5, 7)) db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b3', buildNumber=1, branch='a', mozillaRevision='defau', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 2, 3, 4, 5, 6, 7), shippedAt=datetime(2005, 2, 3, 4, 5, 6, 7), comment="yet an other amazing comment", isSecurityDriven=True, description="Another beta release for Firefox 3") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0.1', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazing comment", description="we did this release because of foo") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = DeveditionRelease( partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b5', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazing comment", description="we did this release because of foo") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) # Thunderbird data r = ThunderbirdRelease(commRevision='ghi', commRelbranch=None, partials='0', promptWaitTime=None, submitter='bob', version='2.0', buildNumber=2, branch='b', mozillaRevision='ghi', l10nChangesets='li', mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 1, 3, 1, 1, 1, 1), comment='My great comment!', isSecurityDriven=True, mh_changeset='xyz', description="we did this release because of bar") r.complete = True r.ready = True db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='4.0', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), description="foo reason") db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='23.0', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 1, 3, 1, 1, 1, 1), description="bar reason") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='23.0.1', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', mozillaRelbranch=None, submittedAt=datetime(2014, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2014, 2, 3, 1, 1, 1, 1), description="bar2 reason") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='24.0b2', buildNumber=2, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 2, 1, 1, 1, 1, 1), description="bar2 reason") r.complete = True r.ready = True r.status = "shipped" db.session.add(r) db.session.commit()
def setUp(self): self.cef_fd, self.cef_file = mkstemp() app.config['DEBUG'] = True app.config['CSRF_ENABLED'] = False app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:' app.config.update(cef_config(self.cef_file)) with app.test_request_context(): db.init_app(app) db.create_all() r = FennecRelease(submitter='joe', version='1', buildNumber=1, branch='a', mozillaRevision='abc', l10nChangesets='af de', dashboardCheck=True, mozillaRelbranch=None) r.ready = True db.session.add(r) r = FennecRelease(submitter='joe', version='4', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='gh ij', dashboardCheck=True, mozillaRelbranch=None) db.session.add(r) r = FennecRelease(submitter='joe', version='4', buildNumber=5, branch='a', mozillaRevision='abc', l10nChangesets='lk mn', dashboardCheck=False, mozillaRelbranch='BAR', submittedAt=datetime(2005, 1, 2, 2, 3, 3, 5)) db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='2.0', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', dashboardCheck=True, mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 4, 3, 4, 5, 6), comment="yet an other amazying comment", enUSPlatforms=None) r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='2.0.2esr', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', dashboardCheck=True, mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 4, 3, 4, 5, 6), comment="yet an other amazying comment", enUSPlatforms=None) r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='38.1.0esr', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', dashboardCheck=True, mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2015, 1, 4, 3, 4, 5, 6), comment="yet an other amazying comment", enUSPlatforms=None) r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) r = FennecRelease(submitter='joe', version='24.0', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='gh ij', dashboardCheck=True, submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 3, 1, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) r = FennecRelease(submitter='joe', version='24.0.1', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='gh ij', dashboardCheck=True, submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 2, 26, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) r = FennecRelease(submitter='joe', version='23.0b2', buildNumber=4, branch='a', mozillaRevision='abc', l10nChangesets='gh ij', dashboardCheck=True, submittedAt=datetime(2015, 2, 26, 3, 4, 5, 6), shippedAt=datetime(2015, 2, 27, 3, 4, 5, 6), mozillaRelbranch=None) r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b2', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', dashboardCheck=True, mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazying comment", isSecurityDriven=True, description="We did this because of an issue in NSS", enUSPlatforms=None) r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0b2', buildNumber=2, branch='a', mozillaRevision='defa', l10nChangesets='ja zu', dashboardCheck=True, mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 3, 2, 3, 4, 5, 6), comment="yet an other amazying comment", enUSPlatforms=None) db.session.add(r) r = FirefoxRelease(partials='0,1', promptWaitTime=5, submitter='joe', version='3.0.1', buildNumber=1, branch='a', mozillaRevision='def', l10nChangesets='ja zu', dashboardCheck=True, mozillaRelbranch='FOO', submittedAt=datetime(2005, 1, 2, 3, 4, 5, 6), shippedAt=datetime(2005, 1, 2, 3, 4, 5, 6), comment="yet an other amazying comment", enUSPlatforms=None, description="we did this release because of foo") r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) # Thunderbird data r = ThunderbirdRelease(commRevision='ghi', commRelbranch=None, partials='0', promptWaitTime=None, submitter='bob', version='2', buildNumber=2, branch='b', mozillaRevision='ghi', l10nChangesets='li', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 1, 3, 1, 1, 1, 1), comment='My great comment!', enUSPlatforms="foo bar", isSecurityDriven=True, description="we did this release because of bar") r.complete = True r.ready = True db.session.add(r) r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='4.0', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), description="foo reason") db.session.add(r) db.session.commit() r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='23.0', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 1, 3, 1, 1, 1, 1), description="bar reason") r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) db.session.commit() r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='23.0.1', buildNumber=1, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime(2014, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2014, 2, 3, 1, 1, 1, 1), description="bar2 reason") r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) db.session.commit() r = ThunderbirdRelease(commRevision='zzz', commRelbranch=None, partials='1.0build1', promptWaitTime=None, submitter='bob', version='24.0b2', buildNumber=2, branch='b', mozillaRevision='yyy', l10nChangesets='yy zz', dashboardCheck=True, mozillaRelbranch=None, submittedAt=datetime(2005, 1, 1, 1, 1, 1, 1), shippedAt=datetime(2005, 2, 1, 1, 1, 1, 1), description="bar2 reason") r.complete = True r.ready = True # Shipped r.status = "postrelease" db.session.add(r) db.session.commit()