Skip to content

Commit fa11b25

Browse files
committed
add failover test cases
1 parent ef13d84 commit fa11b25

23 files changed

+9314
-0
lines changed

robot/Resources/__init__.py

Whitespace-only changes.

robot/Resources/config/__init__.py

Whitespace-only changes.

robot/Resources/config/config.py

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf8 -*-
3+
4+
'''
5+
基本配置信息,若配置新的环境,需要更改此文件
6+
'''
7+
#curve info
8+
curve_workspace = "/var/lib/jenkins/workspace/curve_failover/"
9+
chunkserver_start_script = "./deploy/local/chunkserver/start_chunkservers_locally.sh"
10+
chunkserver_stop_script = "./deploy/local/chunkserver/stop_chunkservers_locally.sh"
11+
mds_start = curve_workspace + "bazel-bin/src/mds/main/curvemds"
12+
snapshot_server_start = curve_workspace + "bazel-bin/src/snapshotcloneserver/snapshotcloneserver"
13+
curvefs_tool = curve_workspace + "bazel-bin/tools/curvefsTool"
14+
createfile_tool = curve_workspace + "bazel-bin/src/tools/createFile"
15+
libcurve_workflow = curve_workspace + "bazel-bin/test/client/fake/curve_client_workflow"
16+
chunkserver_log_dir = curve_workspace + "deploy/local/chunkserver/log/"
17+
snapshot_clone_server_conf = curve_workspace + "conf/snapshot_clone_server.conf"
18+
client_conf = curve_workspace + "conf/client.conf"
19+
20+
# volume info
21+
default_vol_size = 5
22+
default_vol_max = 4000
23+
default_vol_extend_size = 10
24+
25+
# file info
26+
file_name = "/1"
27+
old_name = "/1"
28+
new_name = "/2"
29+
file_name_with_parent = "/lzw/1"
30+
old_name_with_parent = "/lzw/1"
31+
new_name_with_parent = "/lzw/2"
32+
file_name_no_parent = "/xyz/test"
33+
dir_path = "/lzw"
34+
dir_path_with_parent = "/lzw/test"
35+
dir_path_no_parent = "/abc/test"
36+
user_name = "userinfo"
37+
pass_word = ""
38+
root_name = "root"
39+
root_password = "root_password"
40+
root_error_password = "root_error_password"
41+
size = 10737418240
42+
small_size = 1073741824
43+
big_size = 5497558138880
44+
new_size = 21474836480
45+
buf = "aaaaaaaa"*512
46+
buf_list = []
47+
offset = 0
48+
length = 4096
49+
write_stopped = False
50+
# mds info
51+
mds_ip = "127.0.0.1"
52+
mds_port = 6666
53+
mds_listen = "-listenAddr=127.0.0.1:6666"
54+
55+
#abnormal test
56+
chunkserver_list = ["10.182.26.16","10.182.26.17","10.182.26.18","10.182.26.34","10.182.26.35","10.182.26.36"]
57+
mds_list = ["10.182.26.25","10.182.26.16","10.182.26.17"]
58+
etcd_list = ["10.182.26.16","10.182.26.17","10.182.26.18"]
59+
client_list = ["10.182.26.25"]
60+
chunkserver_reset_list = ["10.182.26.34","10.182.26.35","10.182.26.36"]
61+
mds_reset_list = ["10.182.26.16","10.182.26.17"]
62+
abnormal_user = "nbs"
63+
pravie_key_path = "/home/nbs/rsa/id_rsa"
64+
abnormal_db_host = "10.182.2.25"
65+
recover_time = 3600
66+
offline_timeout = 100
67+
vol_uuid = ""
68+
thrash_map = True
69+
thrash_thread = []
70+
#snapshot_test
71+
snap_server_list = ["10.182.26.25","10.182.26.16","10.182.26.17"]
72+
snap_version = '2019-08-01'
73+
snapshot_size = 10
74+
snapshot_timeout = 1200
75+
snapshot_vmid = ""
76+
snapshot_volid = ""
77+
snapshot_vip = "10.182.26.25"
78+
# db info
79+
db_host = "127.0.0.1"
80+
db_port = 3306
81+
db_user = "root"
82+
db_pass = "qwer"
83+
mds_db_name = "curve_mds"
84+
snap_db_name = "curve_snapshot"
85+
curve_sql = "./src/repo/curve_mds.sql"
86+
snap_sql = "./src/repo/curve_snapshot.sql"
87+
88+
# chunkserver mount point
89+
cs_0 = curve_workspace + "0"
90+
cs_1 = curve_workspace + "1"
91+
cs_2 = curve_workspace + "2"
92+
cs_num = 3
93+
# chunkserver log dir
94+
cs_log = "deploy/local/chunkserver/log/"
95+
mysql_log = "/var/log/mysql/mysql.log"
96+
97+
# topology info
98+
cluster_map = "./tools/topo_example.json"
99+
physicalpool_name = "pool1"
100+
physical_op = "create_physicalpool"
101+
102+
# flag
103+
clean_before = True
104+
clean_after = True
105+
sudo_flag = True
106+
sudo_way = "-iu"
107+
108+
# logicalpool info
109+
copyset_num = 64
110+
logical_op = "create_logicalpool"
111+
112+
# libcurve workflow
113+
fake_mds_false = "false"
114+
fake_chunkserver_false = "false"
115+
116+
#nova_host
117+
nova_host ="10.187.0.10"
118+
nova_user = "nbs"
119+
ssh_key = "/home/nbs/rsa/id_rsa"
120+
#vm_host
121+
vm_host = "60.191.87.67"
122+
vm_stability_host = "60.191.87.92"
123+
vm_user = "root"
124+
fio_iosize = "4" #4k
125+
126+
# snapshot test param
127+
snapshot_file_name = "/lc"
128+
snapshot_s3_object_location = "snapshot_test_chunk_data@s3"
129+
130+
#curve thrash
131+
image_id = "94f54f29-af1e-4afd-acc9-8481c560356b"
132+
avail_zone = "dongguan1.curve1:pubbeta2-curve17.dg.163.org"
133+
vm_prefix = ""
134+
135+
level1 = [('test_kill_chunkserver_num',1),\
136+
('test_kill_chunkserver_num',2),\
137+
('test_stop_chunkserver_host'),\
138+
('test_ipmitool_restart_chunkserver'),\
139+
('test_outcs_recover_copyset'),\
140+
('test_kill_mds',1),\
141+
('test_kill_etcd',1),\
142+
('test_reboot_nebd')]
143+
level2 = [('reboot_curve_vm'),\
144+
('test_ipmitool_restart_client'),\
145+
('test_chunkserver_cpu_stress',95),\
146+
('test_mds_cpu_stress',95),\
147+
('test_client_cpu_stress',95),\
148+
('test_chunkserver_mem_stress',95),\
149+
('test_mds_mem_stress',95),\
150+
('test_client_mem_stress',95)]
151+
level3 = [('test_cs_loss_package',5),\
152+
('test_stop_chunkserver_host'),\
153+
('test_kill_chunkserver_num',1),\
154+
('test_ipmitool_restart_chunkserver'),\
155+
('test_kill_mds',3),\
156+
('test_kill_etcd',3)]

robot/Resources/keywords/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)