Added missing maxadmin tests.
This commit is contained in:
@ -8,3 +8,7 @@ else()
|
|||||||
message(STATUS "Could not find editline library. MaxAdmin will be built without it.")
|
message(STATUS "Could not find editline library. MaxAdmin will be built without it.")
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS maxadmin DESTINATION ${MAXSCALE_BINDIR})
|
install(TARGETS maxadmin DESTINATION ${MAXSCALE_BINDIR})
|
||||||
|
|
||||||
|
if(BUILD_TESTS)
|
||||||
|
add_subdirectory(test)
|
||||||
|
endif()
|
||||||
|
4
client/test/CMakeLists.txt
Normal file
4
client/test/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
install(PROGRAMS maxadmin_test.sh DESTINATION ${CMAKE_BINARY_DIR})
|
||||||
|
install(PROGRAMS maxadmin_stress.sh DESTINATION ${CMAKE_BINARY_DIR})
|
||||||
|
add_test(TestMaxAdmin ${CMAKE_BINARY_DIR}/maxadmin_test.sh)
|
||||||
|
add_test(TestMaxAdminStress ${CMAKE_BINARY_DIR}/maxadmin_stress.sh)
|
0
client/test/maxadmin_stress.sh
Normal file → Executable file
0
client/test/maxadmin_stress.sh
Normal file → Executable file
@ -96,61 +96,45 @@ fi
|
|||||||
#
|
#
|
||||||
# Test enable|disable log debug|trace|message|error
|
# Test enable|disable log debug|trace|message|error
|
||||||
#
|
#
|
||||||
maxadmin -pmariadb enable log debug >& /dev/null
|
|
||||||
if [ $? -eq "1" ]; then
|
|
||||||
echo "Enable debug log: Failed"
|
|
||||||
failure=`expr $failure + 1`
|
|
||||||
else
|
|
||||||
passed=`expr $passed + 1`
|
|
||||||
echo "Enable debug log: Passed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
maxadmin -pmariadb enable log trace >& /dev/null
|
for action in enable disable
|
||||||
if [ $? -eq "1" ]; then
|
do
|
||||||
echo "Enable trace log: Failed"
|
maxadmin -pmariadb $action log debug >& /dev/null
|
||||||
failure=`expr $failure + 1`
|
if [ $? -eq "1" ]; then
|
||||||
else
|
echo "$action debug log: Failed"
|
||||||
passed=`expr $passed + 1`
|
failure=`expr $failure + 1`
|
||||||
echo "Enable trace log: Passed"
|
else
|
||||||
fi
|
passed=`expr $passed + 1`
|
||||||
|
echo "$action debug log: Passed"
|
||||||
|
fi
|
||||||
|
|
||||||
maxadmin -pmariadb enable log message >& /dev/null
|
maxadmin -pmariadb $action log trace >& /dev/null
|
||||||
if [ $? -eq "1" ]; then
|
if [ $? -eq "1" ]; then
|
||||||
echo "Enable message log: Failed"
|
echo "$action trace log: Failed"
|
||||||
|
failure=`expr $failure + 1`
|
||||||
|
else
|
||||||
|
passed=`expr $passed + 1`
|
||||||
|
echo "$action trace log: Passed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
maxadmin -pmariadb $action log message >& /dev/null
|
||||||
|
if [ $? -eq "1" ]; then
|
||||||
|
echo "$action message log: Failed"
|
||||||
failure=`expr $failure + 1`
|
failure=`expr $failure + 1`
|
||||||
else
|
else
|
||||||
passed=`expr $passed + 1`
|
passed=`expr $passed + 1`
|
||||||
echo "Enable message log: Passed"
|
echo "$action message log: Passed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
maxadmin -pmariadb enable log error >& /dev/null
|
maxadmin -pmariadb $action log error >& /dev/null
|
||||||
if [ $? -eq "1" ]; then
|
if [ $? -eq "1" ]; then
|
||||||
echo "Enable error log: Failed"
|
echo "$action error log: Failed"
|
||||||
failure=`expr $failure + 1`
|
failure=`expr $failure + 1`
|
||||||
else
|
else
|
||||||
passed=`expr $passed + 1`
|
passed=`expr $passed + 1`
|
||||||
echo "Enable error log: Passed"
|
echo "$action error log: Passed"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
maxadmin -pmariadb disable log debug >& /dev/null
|
|
||||||
if [ $? -eq "1" ]; then
|
|
||||||
echo "Disable debug log: Failed"
|
|
||||||
failure=`expr $failure + 1`
|
|
||||||
else
|
|
||||||
passed=`expr $passed + 1`
|
|
||||||
echo "Disable debug log: Passed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
maxadmin -pmariadb disable log trace >& /dev/null
|
|
||||||
if [ $? -eq "1" ]; then
|
|
||||||
echo "Disable trace log: Failed"
|
|
||||||
failure=`expr $failure + 1`
|
|
||||||
else
|
|
||||||
passed=`expr $passed + 1`
|
|
||||||
echo "Disable trace log: Passed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test restart monitor|service without, with invalid and with long invalid argument
|
# Test restart monitor|service without, with invalid and with long invalid argument
|
||||||
@ -186,7 +170,7 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test set server qwerty master withaout, with invalid and with long invalid arg
|
# Test set server qwerty master without, with invalid and with long invalid arg
|
||||||
#
|
#
|
||||||
maxadmin -pmariadb set server qwerty >& /dev/null
|
maxadmin -pmariadb set server qwerty >& /dev/null
|
||||||
if [ $? -eq "1" ]; then
|
if [ $? -eq "1" ]; then
|
||||||
|
Reference in New Issue
Block a user