Skip to content

Commit ab32b9a

Browse files
authored
Implement the new upstream project for this, fixes #13 (#14)
1 parent 0b0e356 commit ab32b9a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tests/test.bats

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,26 @@ pull_health_checks() {
4646
rm -rf ${TESTDIR}/var/encore/*
4747
run ddev pull ibexa-cloud -y
4848
assert_success
49-
run ddev mysql -e 'SELECT COUNT(*) from ezpage_zones;'
49+
run ddev mysql -e 'SELECT COUNT(*) from dummy_table;'
5050
assert_success
51-
assert_line --index 1 "13"
51+
assert_line --index 1 "3"
5252
ddev mutagen sync
5353
assert_file_exist "${TESTDIR}/var/encore/ibexa.richtext.config.manager.js"
5454
}
5555

5656
push_health_checks() {
5757
# set -x
5858
# Add a new value into local database so we can test it arrives in push environment
59-
ddev mysql -e "INSERT INTO ezpage_zones VALUES(18, 'push-mysql-insertion');"
60-
run ddev mysql -e "SELECT name FROM ezpage_zones WHERE id=18;"
59+
run ddev mysql -e "INSERT INTO dummy_table VALUES(9999, 'dummy-name', 22);"
6160
assert_success
62-
assert_output --partial "push-mysql-insertion"
61+
run ddev mysql -e "SELECT name FROM dummy_table WHERE id=9999;"
62+
assert_success
63+
assert_output --partial "dummy-name"
6364
# make sure it doesn't already exist upstream
64-
ddev ibexa_cloud db:sql -p ${IBEXA_PROJECT} -e push -- 'DELETE from ezpage_zones;'
65-
run ddev ibexa_cloud db:sql -p ${IBEXA_PROJECT} -e push -- 'SELECT COUNT(*) FROM ezpage_zones WHERE id=18;'
66-
assert_line --index 1 --regexp "^ *0 *"
65+
run ddev ibexa_cloud db:sql -p ${IBEXA_PROJECT} -e push -- 'DROP TABLE IF EXISTS dummy_table;'
66+
assert_success
67+
run ddev ibexa_cloud db:sql -p ${IBEXA_PROJECT} -e push -- 'SHOW TABLES like "dummy_table";'
68+
assert_success
6769

6870
# Add a spare file into local mount so we can test it arrives in push
6971
run ddev ibexa_cloud ssh -p ${IBEXA_PROJECT} -e push -- rm -f var/encore/files-push-test.txt
@@ -77,8 +79,8 @@ push_health_checks() {
7779
run ddev push ibexa-cloud --environment=IBEXA_ENVIRONMENT=push -y
7880
assert_success
7981
# Verify that our new record now exists
80-
run ddev ibexa_cloud db:sql -p ${IBEXA_PROJECT} -e push -- 'SELECT name FROM ezpage_zones WHERE id=18;'
81-
assert_output --partial push-mysql-insertion
82+
run ddev ibexa_cloud db:sql -p ${IBEXA_PROJECT} -e push -- 'SELECT name FROM dummy_table WHERE id=9999;'
83+
assert_output --partial dummy-name
8284
# Verify the new file exists
8385
run ddev ibexa_cloud ssh -p ${IBEXA_PROJECT} -e push -- ls var/encore/files-push-test.txt
8486
assert_success

0 commit comments

Comments
 (0)