What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

any ideas?

UK7TM6CQJ
UK7TM6CQJ Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

any ideas?

Comments

  • more info might help here again πŸ™‚

  • more to the stack trace, e.g.

  • Unknown
    edited September 2019

    do you run vendor/bin/codecept run or vendor/bin/console code:test?

  • UK7TM6CQJ
    UK7TM6CQJ Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet
    27) ProductApiCest: Create product with invalid type mother grids
     Test  ../ProductApi/Api/ProductApiCest.php:createProductWithInvalidTypeMotherGrids
    Expected HTTP Status Code: 422 (Unprocessable Entity). Actual Status Code: 500 (Internal Server Error)
    Failed asserting that 500 matches expected 422.
    
    Scenario Steps:
    
     7. $I->canSeeResponseCodeIs(422) at ../ProductApi/Api/ProductApiCest.php:279
     6. $I->canSeeResponseIsJson() at ../ProductApi/Api/ProductApiCest.php:278
     5. $I->sendPUT("/api/rest/products",{"data":{"sku":"T1568813644","name":"Payload with invalid type mother grids","fk_locale":46,"id_tax_set":2,"attribute-mother-grids":[{"amg_key":"size_shoes_valentino","amg_type":"invalid_type","st...}) at ../Api/ZedApiTesterTrait.php:67
     4. $I->haveHttpHeader("Content-Type","application/json") at ../Api/ZedApiTesterTrait.php:37
     3. $I->haveHttpHeader("Accept","application/json") at ../Api/ZedApiTesterTrait.php:36
     2. $I->assertNotNull({"data":{"sku":"P102931SKUINVALID","name":"Payload with invalid type mother grids","fk_locale":46,"id_tax_set":2,"attribute-mother-grids":[{"amg_key":"size_shoes_valentino","am...},"The payload count not be decoded") at ../Api/ZedApiTesterTrait.php:113
    
    Artifacts:
    
    Body: {
        "code": 500,
        "message": "No connection defined for database \u0022zed\u0022. Did you forget to define a connection or is it wrong written?",
        "data": []
    }
    Response: /data/shop/development/current/tests/PyzTest/Zed/ProductApi/_output/PyzTest.Zed.ProductApi.Api.ProductApiCest.createProductWithInvalidTypeMotherGrids.fail.json
    
  • UK7TM6CQJ
    UK7TM6CQJ Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    it's actually happening all the time when calling zed api

  • UK7TM6CQJ
    UK7TM6CQJ Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    got it

  • glad we could help πŸ˜„

  • is it project specific or would you like to share your findings, so that the next person can be helped faster?

  • I guess he was missing ConnectionHelper in the codeption.yml

  • UK7TM6CQJ
    UK7TM6CQJ Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    ApplicationDependencyProvider->getApiServiceProviders doesn't work properly with PropelApplicationPlugin, so I had to put back the deprecated PropelServiceProvider

  • UK7TM6CQJ
    UK7TM6CQJ Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    it is happening only for zed api calls