diff --git a/drogon_ctl/templates/config.csp b/drogon_ctl/templates/config.csp index 729dab70..7245447f 100644 --- a/drogon_ctl/templates/config.csp +++ b/drogon_ctl/templates/config.csp @@ -153,10 +153,10 @@ "plugins": [{ //name: The class name of the plugin //"name": "TestPlugin", - //dependencies: Plugins that the plugin depends on. It's a null object by default. + //dependencies: Plugins that the plugin depends on. It can be commented out "dependencies": [], //config: The configuration of the plugin. This json object is the parameter to initialize the plugin. - //It's a null object by default. + //It can be commented out "config": { "heartbeat_interval": 2 } diff --git a/test.sh b/test.sh index d86fd0e7..38c00426 100755 --- a/test.sh +++ b/test.sh @@ -24,4 +24,51 @@ if [ $? -ne 0 ];then exit -1 fi +killall -9 webapp + +#Test drogon_ctl + +drogon_ctl create project drogon_test + +cd drogon_test/controllers + +drogon_ctl create controller Test::SimpleCtrl +drogon_ctl create controller -h Test::HttpCtrl +drogon_ctl create controller -w Test::WebsockCtrl + +if [ ! -f "Test_SimpleCtrl.h" -o ! -f "Test_SimpleCtrl.cc" -o ! -f "Test_HttpCtrl.h" -o ! -f "Test_HttpCtrl.cc" -o ! -f "Test_WebsockCtrl.h" -o ! -f "Test_WebsockCtrl.cc" ];then + echo "Failed to create controllers" + exit -1 +fi + +cd ../filters + +drogon_ctl create filter Test::TestFilter + +if [ ! -f "Test_TestFilter.h" -o ! -f "Test_TestFilter.cc" ];then + echo "Failed to create filters" + exit -1 +fi + +cd ../build +cmake .. + +if [ $? -ne 0 ];then + echo "Error in testing" + exit -1 +fi + +make + +if [ $? -ne 0 ];then + echo "Error in testing" + exit -1 +fi + +if [ ! -f "drogon_test" ];then + echo "Failed to build drogon_test" + exit -1 +fi + +echo "Everything is ok!" exit 0