owncloud / owncloud-sdk

:cloud: ownCloud client library for JavaScript
https://owncloud.dev/owncloud-sdk/
MIT License
75 stars 33 forks source link

Sharing with expiration date contract test against oC10 server failed #1225

Closed saw-jan closed 1 year ago

saw-jan commented 1 year ago

Build: https://drone.owncloud.com/owncloud/owncloud-sdk/4211/9/11 oC10 server: 10.12.0 stable 2023-03-13

as 'testUser1', a POST request to share a file 'test space and + and #.txt' to user with expiration date set
    returns a response which
      has status code 200 (OK)
      includes headers
        "Content-Type" with value "text/xml; charset=utf-8" (OK)
      has a matching body (FAILED)
  as 'testUser1', a POST request to share a file 'test.txt' to user with expiration date set
    returns a response which
      has status code 200 (OK)
      includes headers
        "Content-Type" with value "text/xml; charset=utf-8" (OK)
      has a matching body (FAILED)
  as 'testUser1', a POST request to share a file '文件.txt' to user with expiration date set
    returns a response which
      has status code 200 (OK)
      includes headers
        "Content-Type" with value "text/xml; charset=utf-8" (OK)
      has a matching body (FAILED)
Failures:

1) Verifying a pact between owncloud-sdk and oc-server-pendingOn-ocis Given the user is recreated And the user is recreated And file exists - as 'testUser1', a POST request to share a file 'test space and + and #.txt' to user with expiration date set returns a response which 
    1.1) has a matching body
           $.ocs.meta.message.#text -> Expected 'Expiration date is in the past' to match '(OK)?'
           $.ocs.meta.statuscode.#text -> Expected '100' to be equal to '404'
           $.ocs.data -> Expected child <displayname_file_owner/> but was missing
           $.ocs.data -> Expected child <displayname_owner/> but was missing
           $.ocs.data -> Expected child <expiration/> but was missing
           $.ocs.data -> Expected child <file_target/> but was missing
           $.ocs.data -> Expected child <id/> but was missing
           $.ocs.data -> Expected child <path/> but was missing
           $.ocs.data -> Expected child <permissions/> but was missing
           $.ocs.data -> Expected child <share_type/> but was missing
           $.ocs.data -> Expected child <stime/> but was missing
           $.ocs.data -> Expected child <uid_file_owner/> but was missing
           $.ocs.data -> Expected child <uid_owner/> but was missing
           $.ocs.meta.status.#text -> Expected 'ok' to be equal to 'failure'
2) Verifying a pact between owncloud-sdk and oc-server-pendingOn-ocis Given the user is recreated And the user is recreated And file exists - as 'testUser1', a POST request to share a file 'test.txt' to user with expiration date set returns a response which 
    2.1) has a matching body
           $.ocs.meta.message.#text -> Expected 'Expiration date is in the past' to match '(OK)?'
           $.ocs.meta.statuscode.#text -> Expected '100' to be equal to '404'
           $.ocs.data -> Expected child <displayname_file_owner/> but was missing
           $.ocs.data -> Expected child <displayname_owner/> but was missing
           $.ocs.data -> Expected child <expiration/> but was missing
           $.ocs.data -> Expected child <file_target/> but was missing
           $.ocs.data -> Expected child <id/> but was missing
           $.ocs.data -> Expected child <path/> but was missing
           $.ocs.data -> Expected child <permissions/> but was missing
           $.ocs.data -> Expected child <share_type/> but was missing
           $.ocs.data -> Expected child <stime/> but was missing
           $.ocs.data -> Expected child <uid_file_owner/> but was missing
           $.ocs.data -> Expected child <uid_owner/> but was missing
           $.ocs.meta.status.#text -> Expected 'ok' to be equal to 'failure'
3) Verifying a pact between owncloud-sdk and oc-server-pendingOn-ocis Given the user is recreated And the user is recreated And file exists - as 'testUser1', a POST request to share a file '文件.txt' to user with expiration date set returns a response which 
    3.1) has a matching body
           $.ocs.meta.statuscode.#text -> Expected '100' to be equal to '404'
           $.ocs.data -> Expected child <displayname_file_owner/> but was missing
           $.ocs.data -> Expected child <displayname_owner/> but was missing
           $.ocs.data -> Expected child <expiration/> but was missing
           $.ocs.data -> Expected child <file_target/> but was missing
           $.ocs.data -> Expected child <id/> but was missing
           $.ocs.data -> Expected child <path/> but was missing
           $.ocs.data -> Expected child <permissions/> but was missing
           $.ocs.data -> Expected child <share_type/> but was missing
           $.ocs.data -> Expected child <stime/> but was missing
           $.ocs.data -> Expected child <uid_file_owner/> but was missing
           $.ocs.data -> Expected child <uid_owner/> but was missing
           $.ocs.meta.message.#text -> Expected 'Expiration date is in the past' to match '(OK)?'
           $.ocs.meta.status.#text -> Expected 'ok' to be equal to 'failure'

There were 3 pact failures
saw-jan commented 1 year ago

The nightly CI is pulling the wrong contract version.

SwikritiT commented 1 year ago

The nightly CI is pulling the wrong contract version.

true. Weirdly it was pulling version created by https://github.com/owncloud/owncloud-sdk/pull/1192/commits/458f5a1c56d2ca65fbadf71ed82d04991e0e1b96

Hopefully after merge of this PR https://github.com/owncloud/owncloud-sdk/pull/1227, new version will be created

SagarGi commented 1 year ago

Nightly is passing after the above PR being merged. So closing this issue.