Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
SandyXSD committed Apr 27, 2022
1 parent d5e1f41 commit b4add99
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/encoding_mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
- name: Test mysql gbk support with new client
run: |
stat ${{steps.vars.outputs.MOUNT_POINT1}} && [ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT1}}` == 1 ] && ./juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT1}} || echo $?
stat ${{steps.vars.outputs.MOUNT_POINT2}} && [ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT2}}` == 1 ] && ./juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT2}} || echo $?
db_name=$(basename ${{steps.vars.outputs.META_URL1}})
mysql -uroot -proot -e "drop database if exists $db_name; create database $db_name;"
db_name=$(basename ${{steps.vars.outputs.META_URL2}})
Expand Down Expand Up @@ -107,12 +109,12 @@ jobs:
exit 1
fi
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT1}}
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT2}}
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT1}} || echo $?
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT2}} || echo $?
- name: Test remount with new client after alter db to binary
run: |
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT1}}` == 1 ] || juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT1}} || exit 1
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT2}}` == 1 ] || juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT2}} || exit 1
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT1}}` == 1 ] && ./juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT1}} || echo $?
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT2}}` == 1 ] && ./juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT2}} || echo $?
db_name=$(basename ${{steps.vars.outputs.META_URL1}})
mysql -uroot -proot -e "drop database if exists $db_name; create database $db_name;"
db_name=$(basename ${{steps.vars.outputs.META_URL2}})
Expand Down Expand Up @@ -178,11 +180,11 @@ jobs:
exit 1
fi
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT1}}
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT1}} || echo $?
- name: Test mount old meta using new client without db change
run: |
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT1}}` == 1 ] || juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT1}} || exit 1
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT2}}` == 1 ] || juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT2}} || exit 1
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT1}}` == 1 ] && ./juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT1}} || echo $?
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT2}}` == 1 ] && ./juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT2}} || echo $?
db_name=$(basename ${{steps.vars.outputs.META_URL1}})
mysql -uroot -proot -e "drop database if exists $db_name; create database $db_name;"
db_name=$(basename ${{steps.vars.outputs.META_URL2}})
Expand All @@ -209,11 +211,11 @@ jobs:
exit 1
fi
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT1}}
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT1}} || echo $?
- name: Test dump with old client and load with new client
run: |
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT1}}` == 1 ] || juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT1}} || exit 1
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT2}}` == 1 ] || juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT2}} || exit 1
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT1}}` == 1 ] && ./juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT1}} || echo $?
[ `stat -c %i ${{steps.vars.outputs.MOUNT_POINT2}}` == 1 ] && ./juicefs umount -f ${{steps.vars.outputs.MOUNT_POINT2}} || echo $?
db_name=$(basename ${{steps.vars.outputs.META_URL1}})
mysql -uroot -proot -e "drop database if exists $db_name; create database $db_name;"
db_name=$(basename ${{steps.vars.outputs.META_URL2}})
Expand Down Expand Up @@ -273,8 +275,8 @@ jobs:
exit 1
fi

./juicefs_old umount ${{steps.vars.outputs.MOUNT_POINT1}}
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT2}}
./juicefs_old umount ${{steps.vars.outputs.MOUNT_POINT1}} || echo $?
./juicefs umount ${{steps.vars.outputs.MOUNT_POINT2}} || echo $?
- name: Send Slack Notification
if: ${{ failure() }}
uses: juicedata/slack-notify-action@main
Expand Down

0 comments on commit b4add99

Please sign in to comment.