コード例 #1
0
ファイル: api.py プロジェクト: gotostack/rally
    def check_db_revision(self):
        rev = rally_version.database_revision()

        # Check that db exists
        if rev["revision"] is None:
            raise exceptions.RallyException(
                _LE("Database is missing. Create database by command "
                    "`rally-manage db create'"))

        # Check that db is updated
        if rev["revision"] != rev["current_head"]:
            raise exceptions.RallyException(
                _LE("Database seems to be outdated. Run upgrade from "
                    "revision %(revision)s to %(current_head)s by command "
                    "`rally-manage db upgrade'") % rev)
コード例 #2
0
ファイル: test_version.py プロジェクト: sapcc/rally
 def test_database_revision(self, mock_schema_revision):
     self.assertEqual("foo", version.database_revision())
     mock_schema_revision.assert_called_once_with(detailed=True)
コード例 #3
0
ファイル: test_version.py プロジェクト: andreykurilin/rally
 def test_database_revision(self, mock_schema_revision):
     self.assertEqual("foo", version.database_revision())
     mock_schema_revision.assert_called_once_with(detailed=True)