*** shaohe_feng has quit IRC | 01:26 | |
*** lei-zh has joined #openstack-nimble | 01:34 | |
*** yuntongjin has joined #openstack-nimble | 01:39 | |
*** luyao has joined #openstack-nimble | 01:55 | |
*** shaohe_feng has joined #openstack-nimble | 02:01 | |
luyao | zhenguo: hello, | 02:26 |
---|---|---|
luyao | zhenguo: a question. | 02:26 |
zhenguo | luyao: hi | 02:26 |
luyao | zhenguo: do we allow same name with different instance | 02:27 |
luyao | zhenguo: I have check the ironic code. | 02:27 |
zhenguo | luyao: currently not | 02:27 |
luyao | zhenguo: ironic do not allow . | 02:27 |
luyao | zhenguo: I'm writing the testcase | 02:27 |
zhenguo | luyao: we also not allow | 02:27 |
luyao | zhenguo: and find nimble allow | 02:28 |
zhenguo | luyao: .... | 02:28 |
luyao | zhenguo: let me show the case | 02:28 |
zhenguo | luyao: ok, IIRC, I set the name column to pramary key | 02:28 |
luyao | zhenguo: http://paste.openstack.org/show/589205/ | 02:29 |
luyao | zhenguo: So do we need to fix our nimble code. or do we not need this duplicate_name test case? | 02:30 |
zhenguo | luyao: let me check why, we should keep the duplicate name test case | 02:30 |
zhenguo | luyao: it's weird | 02:30 |
*** luyao has quit IRC | 02:31 | |
*** yuntongjin has quit IRC | 02:32 | |
*** luyao has joined #openstack-nimble | 02:35 | |
*** yuntongjin has joined #openstack-nimble | 02:37 | |
zhenguo | luyao: please take a look at https://github.com/openstack/nimble/blob/master/nimble/db/sqlalchemy/alembic/versions/91941bf1ebc9_initial_migration.py#L90 | 02:51 |
*** kevin__ has joined #openstack-nimble | 02:59 | |
luyao | zhenguo: so we need fix the nimble code firstly? | 03:21 |
zhenguo | luyao: I'm not sure why it doesn't work :( | 03:22 |
zhenguo | luyao: but on my test in real env, if creating instance with duplicate name, it will raise an exception | 03:22 |
luyao | zhenguo: OK,I will do code review and test again to find where the problem is.. | 03:36 |
openstackgerrit | Zhenguo Niu proposed openstack/nimble: Add name UniqueConstraint to instance table https://review.openstack.org/397515 | 03:41 |
zhenguo | luyao: please test with this https://review.openstack.org/397515 | 03:41 |
zhenguo | luyao: seems I forgot to add this when modified the db, but it can work with mysql on real env. | 03:44 |
*** yuntongjin has quit IRC | 04:08 | |
*** luyao has quit IRC | 04:08 | |
*** luyao has joined #openstack-nimble | 04:13 | |
*** luyao has quit IRC | 04:17 | |
*** lei-zh has quit IRC | 04:30 | |
openstackgerrit | Zhong Luyao proposed openstack/nimble: Add instance dbapi test cases https://review.openstack.org/397055 | 04:43 |
*** luyao has joined #openstack-nimble | 04:43 | |
*** luyao has left #openstack-nimble | 04:45 | |
*** luyao has joined #openstack-nimble | 04:45 | |
luyao | zhenguo: it solved the problem now:-D | 04:46 |
openstackgerrit | Zhong Luyao proposed openstack/nimble: Add instance dbapi test cases https://review.openstack.org/397055 | 04:52 |
luyao | zhenguo: hi | 04:54 |
luyao | zhenguo: about the api abstract interface does not consist with the implement interface | 04:54 |
luyao | zhenguo: do we need to fix it? | 04:54 |
luyao | zhenguo: but seems it does matter, it will not break nimble. | 04:55 |
luyao | zhenguo: I means the DB API | 04:55 |
zhenguo | luyao: I think it's better to fix it if you have time :P | 04:57 |
luyao | zhenguo: you have fix it. on nov 10 | 04:58 |
zhenguo | luyao: oh, hah | 04:58 |
zhenguo | luyao: I think the inconsistent interfaces will confuse new developers, so better to fix it, and please feel free to address any issue you find in our code in future. | 05:00 |
openstackgerrit | Merged openstack/nimble: Add name UniqueConstraint to instance table https://review.openstack.org/397515 | 05:10 |
* zhenguo away | 05:11 | |
*** lei-zh has joined #openstack-nimble | 05:28 | |
*** luyao has quit IRC | 05:32 | |
*** yuntongjin has joined #openstack-nimble | 05:39 | |
zhenguo | liusheng: hi, how is the functional test going? | 06:30 |
liusheng | zhenguo: Hi zhenguo, sorry, I had serveral days off since my something of my family | 06:42 |
openstackgerrit | liusheng proposed openstack/nimble: Add support for updating instance type https://review.openstack.org/386439 | 06:52 |
shaohe_feng | zhenguo: liusheng: what's the progess the function test? I can help on some instance related functional test. | 06:58 |
zhenguo | liusheng: no problems, I can help with it if needed | 06:59 |
liusheng | shaohe_feng: thanks!, the instance related functional tests are what I am working on | 07:00 |
shaohe_feng | liusheng: ok. So le me work on the instance_state related | 07:01 |
zhenguo | liusheng, shaohe_feng: thanks, so I will work on engine manager realted tests, seems all tests parts are covered, right? | 07:04 |
liusheng | zhenguo: the instance CURD related trests will pass the api request from nimble-api to nimble-engine as we talked, do we still need functional test for engine manager ? | 07:05 |
zhenguo | liusheng: no, I mean unit tests for engine manager :P | 07:06 |
liusheng | zhenguo: Oh, ok | 07:06 |
zhenguo | ok | 07:06 |
shaohe_feng | zhenguo: yes, seems all covered. But IMHO, you had better have a item list. | 07:06 |
zhenguo | shaohe_feng: ok, I will prepared an item list | 07:08 |
shaohe_feng | liusheng: I have read the function test code. | 07:10 |
shaohe_feng | liusheng: I think we can move objects.register_all() out of the BaseApiTest | 07:11 |
shaohe_feng | liusheng: so we do not need call it in every testcase setup() | 07:11 |
liusheng | shaohe_feng: you mean put it in its parent class ? | 07:13 |
shaohe_feng | liusheng: just put it in __init__.py | 07:13 |
shaohe_feng | liusheng: then python just call this one time. | 07:13 |
shaohe_feng | liusheng: for example. | 07:14 |
shaohe_feng | $ cat mytest/__init__.py | 07:14 |
shaohe_feng | print "hello" | 07:14 |
shaohe_feng | Y | 07:14 |
shaohe_feng | liusheng: $ python -c "import mytest; import mytest; import mytest" | 07:15 |
shaohe_feng | hello | 07:15 |
liusheng | shaohe_feng: got it, cool! | 07:16 |
liusheng | shaohe_feng: yeah, it shouldn't be call in every tests :) | 07:16 |
openstackgerrit | Zhong Luyao proposed openstack/nimble: Add instance dbapi test cases https://review.openstack.org/397055 | 07:17 |
liusheng | shaohe_feng: but I am afraid that the objects.register_all() need some config options which need to be inited firstly | 07:18 |
shaohe_feng | liusheng: let me check it. | 07:19 |
*** luyao has joined #openstack-nimble | 07:34 | |
*** luyao has quit IRC | 08:05 | |
*** lei-zh has quit IRC | 08:31 | |
openstackgerrit | Zhong Luyao proposed openstack/nimble: Add instance dbapi test cases https://review.openstack.org/397055 | 08:35 |
zhenguo | hi all, I just updated the next meeting time https://wiki.openstack.org/wiki/Meetings/Nimble , please feel free to add new agenda there | 08:40 |
*** lei-zh has joined #openstack-nimble | 08:42 | |
openstackgerrit | Zhong Luyao proposed openstack/nimble: Add instance dbapi test cases https://review.openstack.org/397055 | 08:44 |
openstackgerrit | shihanzhang proposed openstack/python-nimbleclient: Support Instance Resource https://review.openstack.org/392399 | 08:47 |
openstackgerrit | shihanzhang proposed openstack/python-nimbleclient: Support Instance Resource https://review.openstack.org/392399 | 08:59 |
shaohe_feng | zhenguo: liusheng: the instance_stat CURD related tests will also pass the api request from nimble-api to nimble-engine. | 09:04 |
zhenguo | shaohe_feng: yes, and you need to mock the ironic api call | 09:05 |
shaohe_feng | zhenguo: liusheng: so how do we do? use mock? or a fake/real backend nimble-engine server? | 09:05 |
zhenguo | shaohe_feng: real nimble-engine backend | 09:06 |
zhenguo | shaohe_feng: for functional tests , we already setup a real env using devstack | 09:06 |
zhenguo | shaohe_feng: oh, in our gate | 09:06 |
liusheng | zhenguo: shaohe_feng I am struggling for that :) | 09:07 |
liusheng | zhenguo: but may we also need to start a nimble-engine with mocked ironic ? | 09:07 |
shaohe_feng | liusheng: zhenguo: I'd like luyao to add these testcase, it is helpful for her to understand how nimble works. | 09:07 |
liusheng | shaohe_feng: sure | 09:07 |
shaohe_feng | liusheng: zhenguo: you can help her. | 09:08 |
zhenguo | shaohe_feng: sure | 09:09 |
shaohe_feng | liusheng: zhenguo: she is a serious girl. you can seen her testcase patch, the coverage is good. https://review.openstack.org/#/c/397055/6 | 09:10 |
zhenguo | lusheng, shaohe_feng: yes, really a good addition to nimble team :P | 09:11 |
liusheng | awsome! | 09:11 |
shaohe_feng | liusheng: how can I get your real nimble-engine backend patch | 09:11 |
shaohe_feng | liusheng: zhenguo: she is still a student. :P | 09:11 |
liusheng | shaohe_feng: did't get ready yet, just testing locally | 09:12 |
zhenguo | shaohe_feng: awsome | 09:12 |
zhenguo | liusheng, shaohe_feng: let me check how ironic api functinal tests work | 09:13 |
shaohe_feng | zhenguo: OK. | 09:13 |
zhenguo | liusheng, shaohe_feng: oh, it's an empty directory :( | 09:14 |
zhenguo | liusheng, shaohe_feng: in fact, in ironic unit api tests, it mocks the conductor api call | 09:16 |
liusheng | I doubt if the instance CURD functional tests really need to pass api requests to nimble-engine ? or only in nimble-api and and there will be functional tests for nimble-engine ? | 09:16 |
zhenguo | liusheng: yes, seems it's ok for api functional tests | 09:18 |
*** openstackgerrit has quit IRC | 09:18 | |
liusheng | zhenguo: if so, we can just mock the RPC | 09:18 |
zhenguo | liusheng, shaohe_feng: yes, | 09:19 |
*** openstackgerrit has joined #openstack-nimble | 09:19 | |
shaohe_feng | zhenguo: OK, so we do not need devstack to start ironic for our api functional test, right? | 09:20 |
liusheng | zhenguo: another way, we can use gabbi test, it seems based on the evn installed by the gate job | 09:20 |
zhenguo | liusheng, shaohe_feng: but seems we really use the env on our gate now | 09:20 |
zhenguo | lusheng, shaohe_feng: according to the logs | 09:21 |
zhenguo | liusheng, shaohe_feng: oh, sorry, it's just api and db, not related to nimble engine now | 09:21 |
liusheng | zhenguo: may it only depends on the packages, not the running service, right ? | 09:22 |
zhenguo | liusheng, shaohe_feng: still I'm thing whether tempest should cover functional tsets? | 09:23 |
*** yuntongjin has quit IRC | 09:24 | |
shaohe_feng | zhenguo: it should. but IMHO, I'm afraid the coverage. | 09:24 |
shaohe_feng | zhenguo: usually, we can add a new fuction with the API fuctional testcase, but seldom with tempest testcase. | 09:25 |
zhenguo | shaohe_feng, liusheng: I found seems ironic moved api functional tests to unit tests | 09:25 |
liusheng | may we can consider the gabbi test, FYI: https://github.com/openstack/aodh/blob/master/aodh/tests/functional/gabbi/gabbits/alarms.yaml | 09:25 |
liusheng | I don't know the internal mechanism of gabbi, but seems it cover the api reqeust | 09:26 |
zhenguo | liusheng: seems we can try, does other projects use it besides aodh? | 09:28 |
shaohe_feng | liusheng: that's need to dig into how it works | 09:28 |
zhenguo | shoahe_feng: haha, liusheng is the PTL of aodh project :P | 09:28 |
*** luyao has joined #openstack-nimble | 09:28 | |
liusheng | zhenguo: Nova also use this | 09:29 |
zhenguo | liusheng: it can cover the real env besides api module? | 09:29 |
shaohe_feng | liusheng: awsome. so you should know gabbi well. | 09:29 |
zhenguo | liusheng, shaohe_feng: before we switch to gabbi, let's talk about functional tests more | 09:30 |
zhenguo | liusheng, shaohe_feng: as I understand api functinal tests should only cover api, right? | 09:30 |
liusheng | zhenguo: it seems is, the api functional tests only cover the api and engine functional test cover the engine | 09:31 |
zhenguo | liusheng: I found ironic do there tests separately in unit tests api and conductor manager | 09:32 |
zhenguo | liusheng, shaohe_feng: but not sure why ironic moved these from functional to ut | 09:34 |
shaohe_feng | zhenguo: I'm read up the doc, what is fuctional test, unit test, and Integration Test. https://codeutopia.net/blog/2015/04/11/what-are-unit-testing-integration-testing-and-functional-testing/ | 09:35 |
liusheng | seems not a clear seperation between functional and ut | 09:35 |
*** luyao has quit IRC | 09:36 | |
shaohe_feng | liusheng: zhenguo: so the level shoulb be functional > integration > unit . | 09:41 |
shaohe_feng | fuctional should use real backend engine for the docs. | 09:42 |
zhenguo | shaohe_feng, liusheng: seems it's not that easy to use real env. | 09:45 |
zhenguo | shaohe_feng, liusheng: as I understand only tempest use real env now | 09:45 |
liusheng | so according this doc, the functional tests only check the responses of API requests ? | 09:46 |
shaohe_feng | liusheng: seem the fucntional should be from the client to the server. but this is not an authoritative doc for test define. | 09:49 |
shaohe_feng | liusheng: we need a authoritative doc | 09:49 |
zhenguo | liusheng, shaohe_feng: Does it make sense that functional tests is for seperated modules, like API functional tests is for api request which mock the rpc call, and engine fucintional tests covers the server side rpc call. integration tests is for all modules? | 09:49 |
shaohe_feng | zhenguo: intesting, there's also a system test. | 09:52 |
shaohe_feng | zhenguo: System test: Test that tests a system as a black box. Dependencies on other systems are often mocked or stubbed during the test (otherwise it would be more of an integration test). | 09:52 |
zhenguo | liusheng, shaohe_feng: oh, my.. | 09:52 |
shaohe_feng | zhenguo: so the level should be functional > System >= integration > unit. | 09:53 |
zhenguo | liusheng, shaohe_feng: sorry, I have to go for dinner, ttyl :P | 09:55 |
shaohe_feng | zhenguo: Integration Testing | 09:55 |
shaohe_feng | As the name suggests, in integration testing the idea is to test how parts of the system work together – the integration of the parts. Integration tests are similar to unit tests, but there’s one big difference: while unit tests are isolated from other components, integration tests are not. For example, a unit test for database access code would not talk to a real database, but an integration | 09:55 |
shaohe_feng | test would. | 09:55 |
shaohe_feng | zhenguo: OK, have a good dinner. | 09:55 |
*** liusheng has quit IRC | 10:56 | |
*** liusheng has joined #openstack-nimble | 10:58 | |
zhenguo | shaohe_feng, liusheng: I'm back | 11:00 |
zhenguo | shaohe_feng, liusheng: currently we use pecan.testing for api functional tests which is not a real env with openstack, you can just use 'tox -efunctional' for testing, | 11:04 |
zhenguo | shaohe_feng: so it doesn't rely on gate to setup a devstack env at all, | 11:06 |
openstackgerrit | Zhenguo Niu proposed openstack/nimble: Replace xrange with range as it doesn't exit in python3 https://review.openstack.org/397689 | 11:19 |
*** lei-zh has quit IRC | 11:24 | |
openstackgerrit | Merged openstack/nimble: Replace xrange with range as it doesn't exit in python3 https://review.openstack.org/397689 | 11:46 |
openstackgerrit | Merged openstack/nimble: Add instance dbapi test cases https://review.openstack.org/397055 | 12:20 |
liusheng | zhenguo: I am trying to write functional test based on the devstack env, for creating instance, it requires a port type parameter | 12:42 |
liusheng | zhenguo: what is that mean ? | 12:42 |
openstackgerrit | liusheng proposed openstack/nimble: WIP: Add gabbi tests for instance CURD https://review.openstack.org/397728 | 12:54 |
zhenguo | liusheng: I think seems we don't need to write functional test based on devstack env | 13:20 |
*** aarefiev has joined #openstack-nimble | 13:20 | |
*** aarefiev has left #openstack-nimble | 13:20 | |
liusheng | zhenguo: so dont need to cover the process nimble-api -> nimble-engine in functional test ? | 13:21 |
zhenguo | liusheng: I think so, | 13:22 |
zhenguo | liusheng: seems functional tests for each module is enough | 13:22 |
zhenguo | liusheng: what do you think? | 13:22 |
liusheng | zhenguo: we can add test based on gabbi to cover a real instance creation process, but the real creation process may be a bit complex | 13:23 |
zhenguo | liusheng: oh, I just saw your patch based on gabbi, | 13:24 |
zhenguo | liusheng: I'm not quite familiar with gabii, if it can work, that would be fine | 13:24 |
liusheng | zhenguo: something wrong about the patch, the gabbi tests cannot be loaded ;P | 13:24 |
zhenguo | liusheng: the reason I suggestion to use functional for each module is that I think it would more complex to implement | 13:25 |
zhenguo | liusheng: oh, the reason is that I think all functional tests will be more complex than seperated | 13:27 |
liusheng | zhenguo: yeah, it can be implement thoeretically, but creating a instance depend on a real ironic, a real image, a real network | 13:28 |
zhenguo | liusheng: yes, if so, I think it should be covered by tempest | 13:28 |
zhenguo | liusheng: and I think we can introduce tempest plugin quickly | 13:28 |
zhenguo | liusheng: we can add more tests to templest based on real env, and add functional tests for seperated module like api and engine, then add UTs, seem that would be enough. | 13:30 |
liusheng | zhenguo: agree | 13:30 |
zhenguo | liusheng: thanks | 13:30 |
zhenguo | liusheng: so it's ok with currently pecan.testing framework for api tests | 13:30 |
zhenguo | liusheng: and mock rpcapi call for engine manager | 13:31 |
liusheng | zhenguo: so we can mock the rpc calls add instance CURD functional tests | 13:31 |
zhenguo | liusheng: yes, I think it's enough. | 13:31 |
zhenguo | shaohe_feng: are you still around? | 13:31 |
*** RuiChen has quit IRC | 14:00 | |
* zhenguo goes home | 14:07 | |
*** openstackgerrit has quit IRC | 15:48 | |
*** openstackgerrit has joined #openstack-nimble | 15:49 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!