owncloud / owncloud/QA

Create test plan for testing LOCK requests on WebDAV

Open
#96 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dev:acceptance-tests QA-p3 QA:team Server
Dominant language
Shell
Stars
16
Forks
16
Avg merge
11h 11m
Merged PRs (30d)
1

Description

We should have some automated integration tests on whether LOCK requests do work for the whitelisted clients. (currently "Microsoft Office OneNote 2013" and "WebDAVFS")

Supported client

Request:

LOCK /master/remote.php/webdav/README.md HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Type: text/xml; charset="utf-8"
User-Agent: Microsoft Office OneNote 2013
Content-Length: 0
Host: localhost
Authorization: Basic YWRtaW46YWRtaW4=

<?xml version="1.0" encoding="utf-8" ?><D:lockinfo xmlns:D="DAV:"><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/></D:locktype><D:owner><D:href>MIS\bkirsch</D:href></D:owner></D:lockinfo>

Response:

HTTP/1.1 200 OK
Date: Tue, 26 Jan 2016 16:36:48 GMT
Server: Apache/2.4.16 (Unix) PHP/5.6.16
X-Powered-By: PHP/5.6.16
Set-Cookie: ocaez77rfdft=c9sc0u4rnngtvtp1a65v4r9pb7; path=/master; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: oc_sessionPassphrase=YOw%2FNGaZsg9Dbe10jCD2p0j1f4IKfcBgK%2FWydFSmKPDoCyNmbNikDZsOJpqQs8H%2B07fkz6jrQwBUMS2fhUR9WHuQiTRHiihVswfgKV5dxkQO8Bwh%2FYGdG1qQBO9rPuIp; path=/master; httponly
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
Set-Cookie: ocaez77rfdft=lir96ulc6v1jk0s099n4bfua50; path=/master; HttpOnly
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Robots-Tag: none
X-Frame-Options: SAMEORIGIN
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Content-Length: 551
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

<?xml version="1.0"?>
<d:prop xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
 <d:lockdiscovery>
  <d:activelock>
   <d:lockscope>
    <d:exclusive/>
   </d:lockscope>
   <d:locktype>
    <d:write/>
   </d:locktype>
   <d:lockroot>
    <d:href>README.md</d:href>
   </d:lockroot>
   <d:depth>infinity</d:depth>
   <d:timeout>Second-1800</d:timeout>
   <d:locktoken>
    <d:href>opaquelocktoken:04c6e90faac2675aa89e2176d2eec7d8</d:href>
   </d:locktoken>
   <d:owner/>
  </d:activelock>
 </d:lockdiscovery>
</d:prop>

# Not supported client:

Request:

LOCK /master/remote.php/webdav/README.md HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Type: text/xml; charset="utf-8"
User-Agent: Unsupported
Content-Length: 0
Host: localhost
Authorization: Basic YWRtaW46YWRtaW4=

<?xml version="1.0" encoding="utf-8" ?><D:lockinfo xmlns:D="DAV:"><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/></D:locktype><D:owner><D:href>MIS\bkirsch</D:href></D:owner></D:lockinfo>

Response:

HTTP/1.1 501 Not Implemented
Date: Tue, 26 Jan 2016 17:02:01 GMT
Server: Apache/2.4.16 (Unix) PHP/5.6.16
X-Powered-By: PHP/5.6.16
Set-Cookie: ocaez77rfdft=94klbhgo2jl01e0a3rtkbo34l3; path=/master; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: oc_sessionPassphrase=xo3kzqsdKW5z0rGHTpTbtATFp8NiCyTRS6NEAzNKSAXPQkyNpG%2F5J8PQdp8W3VupniOGwpXdlU0bB%2B8187bkHrZ65gN7a0kf8rl%2FRh7WbuYDf0WPXXdAFEVyUXt1YZ0M; path=/master; httponly
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
Set-Cookie: ocaez77rfdft=1mlc8n97f07u7otiecr8epf5a0; path=/master; HttpOnly
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Robots-Tag: none
X-Frame-Options: SAMEORIGIN
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Content-Length: 247
Connection: close
Content-Type: application/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotImplemented</s:exception>
  <s:message>There was no handler found for this "LOCK" method</s:message>
</d:error>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or existing test is named. Start by locating the QA integration-test entry point for WebDAV and reproduce the LOCK requests against /remote.php/webdav/README.md. Done means automated coverage confirms 200 lock discovery for Microsoft Office OneNote 2013 and WebDAVFS, and 501 Not Implemented for an unsupported client.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.