openservicebrokerapi / osb-checker

An automatic checker to verify an Open Service Broker API implementation against the specification
https://github.com/openservicebrokerapi/servicebroker/
Apache License 2.0
48 stars 40 forks source link

Add polling instance status after async operations #52

Closed leonwanghui closed 6 years ago

leonwanghui commented 6 years ago

This PR is proposed for solving #46 by adding polling instance status method after async (provision, update and deprovision) operations.

cfdreddbot commented 6 years ago

Hey leonwanghui!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

cfdreddbot commented 6 years ago

Hey leonwanghui!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

norshtein commented 6 years ago

LGTM

Approved with PullApprove

leonwanghui commented 6 years ago

Hi @norshtein @zhongyi-zhang , when I tested this patch with some real services, some errors occur as below:

PROVISION - new
should accept a valid provision request9476ms
PROVISION - poll
should reject requests without X-Broker-API-Version header with 412
should reject unauthorized requests with 401
should reject bad credentials with 401
should return succeeded operation status after provision
should return succeeded operation status after provision
Error: done() called multiple times
    at pollInstanceLastOperationStatus (test/test.js:502:5)
    at Context.<anonymous> (test/test.js:238:21)

Do you know how to fix it? Thanks!

leonwanghui commented 6 years ago

Hi @norshtein @zhongyi-zhang , could you give some advice for the ci errors below:

  1) Customized test cases
       Mock Service Test
         PROVISION - new
           PROVISION - poll
             should return succeeded operation status after provision:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

Thanks!

zhongyi-zhang commented 6 years ago

LGTM.

Approved with PullApprove

norshtein commented 6 years ago

LGTM

Approved with PullApprove