添加数据库版本,单元测试不通过,报DB Migration 348 does not have a test. Please add one!
来源:互联网 发布:hive sql create 编辑:程序博客网 时间:2024/05/18 08:43
tox -e py27时, 单元测试报错。
DB Migration 348 does not have a test. Please add one!
首先我是添加了一个db version为348的db版本,我本来想不添加单元测试,就不会影响到新添加的db version,结果尽然这个报了个db version单元测试的错。
还是想搞明白为什么会这样,毕竟我以前用ironic的时候,并没有这样的情况。
跟代码:
nova/tests/unit/db/test_migrations.py test_walk_versions(self):
oslo_db/sqlalchemy/test_migrations.py walk_versions()
查看 walk_version()里代码
根据分析,于是在 nova/tests/unit/db/test_migrations.py 里加上单元测试代码。
可是还是报错,报如下错误:
这就更恼火了,怎么竟然alter都不被允许了。于是细跟代码发现
于是在 exceptions 里加入 348,解决这次单元测试问题。
阅读全文
0 0
- 添加数据库版本,单元测试不通过,报DB Migration 348 does not have a test. Please add one!
- DB Migration 数据库版本管理工具 学习笔记
- Error: Failed to create the site. The machine does not have a valid license. Please authorize ArcGIS
- Android开发:ADT+Eclipse使用报错:Text editor does not have a document provider
- ViewPager的报错:ViewPager does not have a PagerAdapter set
- maven打包报错:Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no
- 好尴尬的错误: Please specify constructor invocation; classifier 'Basics' does not have a companion object
- 安卓7.1中添加服务,内核log出现Service xxx does not have a SELinux domain defined【转】
- The application does not have a valid signature
- Text editor does not have a document provider
- any object does not have a member named generator
- DataGridView Index -1 does not have a value 错误
- Activity does not have a parent activity name specified.
- java.lang.IllegalStateException: Fragment does not have a view
- init: Service powerbtn does not have a SELinux domain defined.
- Service xxx does not have a SELinux domain defined
- Service xxx does not have a SELinux domain defined
- Service xxx does not have a SELinux domain defined
- 51nod1640-最小生成树&二分|性质-天气晴朗的魔法
- kali Linux 第四章 实验环境
- bzoj 1833 [ZJOI2010]count 数字计数 数位dp
- Oracle:表
- 机器人领域的国际会议
- 添加数据库版本,单元测试不通过,报DB Migration 348 does not have a test. Please add one!
- basepath的作用 (转)
- 页面1,2
- MT4白标升级MT5 用户信息
- python基础-递归、二分法查找(for\递归)、三级菜单、压栈思想
- 在matlab中利用xml工具包从xml文件中提取数据
- 英语简单的6种构词法
- 你的项目的pom.xml文件中加入如下配置:
- Pat 1022. D进制的A+B (20)