MageTest / BehatMage

Behat for Magento
MIT License
85 stars 31 forks source link

Avoid MySQL integrity constraint violation #62

Closed vernard closed 9 years ago

vernard commented 10 years ago

I followed the sample in README and on my second run of the test, it showed this error.

Unable to create the Magento fixture SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-1' for key 'UNQ_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID'

I followed the solution in this page (http://www.magentocommerce.com/boards/viewthread/300959/)

scrutinizer-notifier commented 10 years ago

The inspection completed: No new issues

vernard commented 10 years ago

This is my first PR and I'm quite sure I did something wrong. Please tell me what I did wrong and how to improve it.

jamescowie commented 10 years ago

Hello @vernard the reason the build failed ( red cross ) next to your pull request is because you modified the behaviour of the code without updating the specs. We use PHPSpec against most of the code. You should be able to click through into Travis to get the error. Alternatively if you run composer install and run PHPSpec you will see the issue locally. If you have any issues please let us know.

vernard commented 10 years ago

I have an issue. The error report. Is there any other way to fix this error(Except for my PR)?

jamescowie commented 10 years ago

Hello @vernard your PR fixes the issue I tested last night. However we need to update the PHPSpecs in order to keep the build green. If I have some more free time tonight I will have a look and add them to your PR so we can merge it in.

vernard commented 10 years ago

Awesome. Thanks.