1clitest.importexporttest.ImportExportTests:
2    #
3    ## test check require import/export flags
4    test_check_require_import_flags
5    test_check_require_import_flags,imex_type=csv
6    test_check_require_export_flags
7    #
8    ## test export from empty bucket
9    test_export_from_empty_bucket,imex_type=json,format_type=lines
10    test_export_from_empty_bucket,imex_type=json,format_type=lines,path=local
11    test_export_from_empty_bucket,imex_type=json,format_type=lines,default_bucket=False,sasl_buckets=1
12    #
13    ## test with bin path
14    test_export_from_empty_bucket,imex_type=json,format_type=lines,default_bucket=False,sasl_buckets=1,path=local
15    test_export_from_sasl_bucket,imex_type=json,format_type=list
16    test_export_from_sasl_bucket,imex_type=json,format_type=lines
17    test_export_from_sasl_bucket,imex_type=json,format_type=list
18    test_export_and_import_back,imex_type=json,format_type=list,import_back=True,nodes_init=2
19    test_export_and_import_back,imex_type=json,format_type=lines,import_back=True,nodes_init=2
20    test_import_json_file,imex_type=json,format_type=lines,import_file=json_1000_lines,nodes_init=2
21    test_import_json_file,imex_type=json,format_type=lines,import_file=json_1000_lines_invalid,nodes_init=2
22    test_import_json_file,imex_type=json,format_type=list,import_file=json_list_1000_lines,nodes_init=2
23    test_import_json_file,imex_type=json,format_type=list,import_file=json_list_1000_lines_invalid,nodes_init=2,default_bucket=False,sasl_buckets=1
24    #
25    ## test export data with special character in password
26    test_imex_with_special_chars_in_password,test_type=export,imex_type=json,format_type=lines,password=passworhash,nodes_init=2,check-preload-keys=False
27    test_imex_with_special_chars_in_password,test_type=export,imex_type=json,format_type=list,password=passworhashbang,nodes_init=2,check-preload-keys=False
28    test_imex_with_special_chars_in_password,test_type=export,imex_type=json,format_type=lines,password=hashpassworhash,nodes_init=2,check-preload-keys=False
29    #
30    ## test import data with special character in password
31    test_imex_with_special_chars_in_password,imex_type=json,format_type=lines,import_file=json_1000_lines,password=passworhash,nodes_init=2,check-preload-keys=False
32    test_imex_with_special_chars_in_password,imex_type=json,format_type=list,import_file=json_list_1000_lines,password=passworhashbang,nodes_init=2,check-preload-keys=False
33    test_imex_with_special_chars_in_password,imex_type=json,format_type=lines,import_file=json_1000_lines,password=hashpassworhash,nodes_init=2,check-preload-keys=False
34    #
35    ## test export with deleted and updated
36    test_export_delete_expired_updated_data,nodes_init=2,delete_percent=50,items=1000,format_type=lines
37    test_export_delete_expired_updated_data,nodes_init=2,delete_percent=50,items=1000,format_type=list
38    test_export_delete_expired_updated_data,nodes_init=2,delete_percent=100,items=1000,format_type=lines
39    test_export_delete_expired_updated_data,nodes_init=2,delete_percent=100,items=1000,format_type=list
40    test_export_delete_expired_updated_data,nodes_init=2,updated=True,items=1000,format_type=lines
41    test_export_delete_expired_updated_data,nodes_init=2,updated=True,items=1000,format_type=list
42    ## test export with localhost in cluster address
43    test_export_with_localhost,imex_type=json,localhost=True,nodes_init=2,items=1000,format_type=lines
44    #
45    ## Import from url was dropped in spock
46    #test_import_json_file,imex_type=json,format_type=lines,import_file=json_1000_lines,nodes_init=2,import_method=url,import_file=https://s3-us-west-1.amazonaws.com/imex-data/json/json_1000_lines
47    #test_import_json_file,imex_type=json,format_type=list,import_file=json_list_1000_lines,nodes_init=2,import_method=url,import_file=https://s3-us-west-1.amazonaws.com/imex-data/json/json_list_1000_lines
48    #test_import_json_file,imex_type=json,format_type=lines,import_file=json_1000_lines,nodes_init=2,default_bucket=False,sasl_buckets=1,import_method=url,import_file=https://s3-us-west-1.amazonaws.com/imex-data/json/json_1000_lines
49    #test_import_json_file,imex_type=json,format_type=list,import_file=json_list_1000_lines,nodes_init=2,default_bucket=False,sasl_buckets=1,import_method=url,import_file=https://s3-us-west-1.amazonaws.com/imex-data/json/json_list_1000_lines
50    #
51    ## import csv with comma
52    test_import_csv_file,imex_type=csv,import_file=csv_comma_1000_lines,nodes_init=2
53    #test_import_csv_file,imex_type=csv,import_file=csv_comma_1000_lines,import_method=url,nodes_init=2,import_file=https://s3-us-west-1.amazonaws.com/imex-data/csv/csv_comma_1000_lines
54    #
55    ## import csv with tab
56    test_import_csv_file,imex_type=csv,import_file=csv_tab_1000_lines,nodes_init=2,field-separator=tab
57    #test_import_csv_file,imex_type=csv,import_file=csv_tab_1000_lines,import_method=url,nodes_init=2,import_file=https://s3-us-west-1.amazonaws.com/imex-data/csv/csv_tab_1000_lines,field-separator=tab
58    #
59    ## import sample files
60    test_import_json_sample,default_bucket=False,imex_type=json,sample_file=beer-sample,nodes_init=2
61    test_import_json_sample,default_bucket=False,imex_type=json,sample_file=gamesim-sample,nodes_init=2
62    test_import_json_sample,default_bucket=False,imex_type=json,sample_file=travel-sample,nodes_init=2
63    #
64    ## import with --skip-docs
65    test_import_json_with_skip_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,skip-docs=0
66    test_import_json_with_skip_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,skip-docs=200,verify-data=True
67    test_import_json_with_skip_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,skip-docs=500,verify-data=True
68    test_import_json_with_skip_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,skip-docs=700,verify-data=True
69    #
70    ## import with --limit-docs
71    test_import_json_with_limit_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,limit-docs=0
72    test_import_json_with_limit_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,limit-docs=200,verify-data=True
73    test_import_json_with_limit_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,limit-docs=500,verify-data=True
74    test_import_json_with_limit_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,limit-docs=700,verify-data=True
75    #
76    ## import json with skip and limit docs
77    test_import_json_with_skip_limit_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,skip-docs=100,limit-docs=200,nodes_init=2,verify-data=True
78    test_import_json_with_skip_limit_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,skip-docs=200,limit-docs=300,nodes_init=2,verify-data=True
79    test_import_json_with_skip_limit_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,skip-docs=300,limit-docs=400,nodes_init=2,verify-data=True
80    test_import_json_with_skip_limit_n_docs,imex_type=json,format_type=lines,import_file=json_1000_lines,skip-docs=400,limit-docs=500,nodes_init=2,verify-data=True
81    #
82    ## import csv with --limit-rows  --skip-rows
83    test_import_csv_with_limit_n_rows,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,limit-rows=200,nodes_init=2,verify-data=True,key-gen=False
84    test_import_csv_with_limit_n_rows,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,limit-rows=500,nodes_init=2,verify-data=True,key-gen=False
85    test_import_csv_with_skip_n_rows,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,skip-rows=100,nodes_init=2,verify-data=True,key-gen=False
86    test_import_csv_with_skip_n_rows,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,skip-rows=700,nodes_init=2,verify-data=True,key-gen=False
87    #
88    ## import csv with skip and limit rows
89    test_import_csv_with_skip_limit_n_rows,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,skip-rows=200,limit-rows=200,nodes_init=2,verify-data=True,key-gen=False
90    test_import_csv_with_skip_limit_n_rows,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,skip-rows=400,limit-rows=400,nodes_init=2,verify-data=True,key-gen=False
91    test_import_csv_with_skip_limit_n_rows,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,skip-rows=600,limit-rows=100,nodes_init=2,verify-data=True,key-gen=False
92    test_import_csv_with_skip_limit_n_rows,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,skip-rows=800,limit-rows=200,nodes_init=2,verify-data=True,key-gen=False
93    #
94    ## import with --omit-empty flag
95    test_import_csv_with_omit_empty,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines_some_empty_value,omit-empty=True,nodes_init=2,verify-data=True,key-gen=False
96    #
97    ## import with --infer-types
98    test_import_csv_with_infer_types,imex_type=csv,field-separator=comma,import_file=csv_comma_1000_lines,infer-types=True,nodes_init=2,verify-data=True,key-gen=False
99    #
100    ## import with invalid json line write to error file (not support list json)
101    test_import_json_file,imex_type=json,format_type=lines,import_file=json_1000_lines_invalid,nodes_init=2,json-invalid-errors=True
102