Skip to content

Commit 22cf9ae

Browse files
Merge pull request #1169 from percona/improve-pvc-resize
K8SPS-553 improve pvc-resize test
2 parents 465481b + 3988c9a commit 22cf9ae

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

e2e-tests/tests/pvc-resize/02-assert.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: kuttl.dev/v1beta1
22
kind: TestAssert
3-
timeout: 120
3+
timeout: 60
44
---
55
apiVersion: v1
66
kind: ConfigMap

e2e-tests/tests/pvc-resize/02-write-data.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: kuttl.dev/v1beta1
22
kind: TestStep
33
commands:
4-
- timeout: 180
4+
- timeout: 60
55
script: |-
66
set -o errexit
77
set -o xtrace
@@ -13,11 +13,7 @@ commands:
1313
"CREATE DATABASE IF NOT EXISTS pvctest; CREATE TABLE IF NOT EXISTS pvctest.data (id int PRIMARY KEY, data text)" \
1414
"-h $haproxy_svc"
1515
16-
for i in {1..50}; do
17-
run_mysql \
18-
"INSERT pvctest.data (id, data) VALUES ($i, 'test data row $i with some content to use storage space')" \
19-
"-h $haproxy_svc"
20-
done
16+
run_mysql_query_file "conf/initial-data.sql" "-h $haproxy_svc"
2117
2218
# Store initial data count for verification
2319
count=$(run_mysql "SELECT COUNT(*) FROM pvctest.data" "-h $haproxy_svc")
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
USE pvctest;
2+
DROP PROCEDURE IF EXISTS insert_pvc_test_data;
3+
4+
DELIMITER //
5+
6+
CREATE PROCEDURE insert_pvc_test_data()
7+
BEGIN
8+
DECLARE i INT DEFAULT 1;
9+
WHILE i <= 50 DO
10+
INSERT INTO data (id, data)
11+
VALUES (i, CONCAT('test data row ', i, ' with some content to use storage space'));
12+
SET i = i + 1;
13+
END WHILE;
14+
END;
15+
//
16+
17+
DELIMITER ;
18+
19+
CALL insert_pvc_test_data();
20+
DROP PROCEDURE insert_pvc_test_data;

0 commit comments

Comments
 (0)