DESCRIPTION

Code for testing csv data transfer - Related to CBQE-1376

Change-Id: I96c2e5123820caa7dba6ba81eb570d8ff70291ed


COMMENTS

author: Paige Todd
date: 2013-10-16 10:37:45.446000000

Uploaded patch set 7.

-------------------------------------
author: Trevor Santana
date: 2013-10-16 14:05:33.735000000

Patch Set 7: Code-Review-1

(5 comments)

Line:10, conf/py-data-recovery.conf -> why almost all is commented?

Line:21, pytests/transfer/csvdatatest.py -> there will be an exception if no default bucket will be found. I mean bucket_to_load is intoduced only in case it exists. So you should assign None value to it prior to the cycle and then check if bucket_to_load: ...

Line:45, pytests/transfer/csvdatatest.py -> create_dir and destination are equal expressions, so no need to put them in if clause

Line:63, pytests/transfer/csvdatatest.py -> use basicStats = rest.get_bucket_json('standard_bucket0')['basicStats'], no need a cycle

Line:70, pytests/transfer/csvdatatest.py -> probably disconnect should be in a finally block, if your test will fail it won't be disconnected with corrent implementation

-------------------------------------
author: Fisher Vargas
date: 2013-10-17 05:36:45.893000000

Patch Set 7: Code-Review-1

(8 comments)

Line:1, conf/py-data-recovery.conf -> Why these tests are commented out? No description found in CBQE to remove these tests. Please verify.

Line:12, pytests/transfer/csvdatatest.py -> Variable names should be improved to username_arg and password_arg.

Line:14, pytests/transfer/csvdatatest.py -> if this load_data function is not being used by other classes, or module. Please keep it private only.

Line:23, pytests/transfer/csvdatatest.py -> I think, it should be assert instead of exception. Since we are validating some intermediate value here. And also, Code re-factoring is also required E.g.

if <cond>:
     do something:
else:
    exception

Can be refactored as:

if not <cond>:
    exception

.... do something. 

See for other cases also.

Line:24, pytests/transfer/csvdatatest.py -> I think, test case is to create and restore csv, so it should give error if test cases fails. Can we create "default" bucket in this exception case and load data further.

Line:36, pytests/transfer/csvdatatest.py -> I think there is should be in testrunner library function to remove a path from any OS. Please implement one if not present.

Line:45, pytests/transfer/csvdatatest.py -> What is csv: here? I think its destination type? Please assign it in different variable e.g destination_type. So, that you can reuse source and destination variable aferwards e.g. source, destination=destination, source.

Line:64, pytests/transfer/csvdatatest.py -> As per the naming conventions, it should be basic_stats. 
Also there is mismatch between the if condition and exception message? Please verify.

-------------------------------------
