summaryrefslogtreecommitdiffstats
path: root/test/functional/libgfapi-python-tests.py
Commit message (Collapse)AuthorAgeFilesLines
* changed write and read functions to support binary dataThiago da Silva2014-02-241-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | both functions were only supporting text data and needed to be changed to support binary data. The issue was found while testing libgfapi-python with smallfile (https://github.com/bengland2/smallfile). When calling gflfs_write, ctypes has no problem converting strings to the correct C data type, but is unable to handle bytearray: b = bytearray(1024) with vol.create(path, os.O_WRONLY | os.O_EXCL, 0644) as fd: fd.write(b) It would throw this error: exception: argument 2: <type 'exceptions.TypeError'>: Don't know how to convert parameter 2 reference: http://docs.python.org/2/library/ctypes.html#calling-functions-continued Change-Id: Ia2bb47343880cbf7121fed9510e4cfa085fe23bd Signed-off-by: Thiago da Silva <thiago@redhat.com>
* add mode parameter to mkdir methodThiago da Silva2014-01-291-1/+1
| | | | | | | | add mode parameter to mkdir to allow setting the dir access mode when the directory is being created Change-Id: I6f1ed0c8800fb65a30448e6082cf55b8220a06d4 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* first libgfapi-python functional testsThiago da Silva2014-01-221-0/+127
adding a few functional tests and removing old tests from source code Change-Id: Iefcb091d614f2825592943cfb42847b5865322c6 Signed-off-by: Thiago da Silva <thiago@redhat.com>