summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-05 14:32:48 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-05 14:32:48 +0100
commit455fcf0bb13baa18eac12d265ebdb743cb8815f3 (patch)
tree90e423a556215dbadd8fe143d3a15779f3561c31 /tests
parent9d60b64fe684b18af5323c2b52cb26c04883db72 (diff)
Added tests (WIP)
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile15
-rw-r--r--tests/test-archive.cpp28
-rw-r--r--tests/test-auth.cpp28
-rw-r--r--tests/test-config.cpp28
-rw-r--r--tests/test-http.cpp28
-rw-r--r--tests/test-https.cpp28
-rw-r--r--tests/test-plugin.cpp28
-rw-r--r--tests/test-privileges.cpp28
-rw-r--r--tests/test-response.cpp28
-rw-r--r--tests/test-server.cpp28
-rw-r--r--tests/test-statistics.cpp28
11 files changed, 291 insertions, 4 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 4522952..00c50a1 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -44,8 +44,19 @@ UNITS=\
webserver.cpp
TESTSRC=\
+ test-archive.cpp \
+ test-auth.cpp \
+ test-config.cpp \
test-environment.cpp \
+ test-http.cpp \
+ test-https.cpp \
+ test-plugin.cpp \
+ test-privileges.cpp \
+ test-response.cpp \
+ test-server.cpp \
+ test-statistics.cpp \
test-webserver.cpp \
+
$(PROGSRC)
build: $(PROJECTNAME)
@@ -71,16 +82,12 @@ dep: $(TESTSRC:.cpp=.d)
auth.o: ../auth.cpp
$(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-base64.o: ../base64.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
config.o: ../config.cpp
$(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
http.o: ../http.cpp
$(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
https.o: ../https.cpp
$(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-os.o: ../os.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
plugin.o: ../plugin.cpp
$(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
privileges.o: ../privileges.cpp
diff --git a/tests/test-archive.cpp b/tests/test-archive.cpp
new file mode 100644
index 0000000..e6b5894
--- /dev/null
+++ b/tests/test-archive.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "archive.h"
+
+using namespace std::string_literals;
+
+class ArchiveFixture
+{
+public:
+ ArchiveFixture(){}
+ ~ArchiveFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(archivetest, ArchiveFixture)
+{
+}
+
diff --git a/tests/test-auth.cpp b/tests/test-auth.cpp
new file mode 100644
index 0000000..7948a0a
--- /dev/null
+++ b/tests/test-auth.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "auth.h"
+
+using namespace std::string_literals;
+
+class AuthFixture
+{
+public:
+ AuthFixture(){}
+ ~AuthFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(auth, AuthFixture)
+{
+}
+
diff --git a/tests/test-config.cpp b/tests/test-config.cpp
new file mode 100644
index 0000000..ddba9c9
--- /dev/null
+++ b/tests/test-config.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "config.h"
+
+using namespace std::string_literals;
+
+class ConfigFixture
+{
+public:
+ ConfigFixture(){}
+ ~ConfigFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(config, ConfigFixture)
+{
+}
+
diff --git a/tests/test-http.cpp b/tests/test-http.cpp
new file mode 100644
index 0000000..2763097
--- /dev/null
+++ b/tests/test-http.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "http.h"
+
+using namespace std::string_literals;
+
+class HTTPFixture
+{
+public:
+ HTTPFixture(){}
+ ~HTTPFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(http, HTTPFixture)
+{
+}
+
diff --git a/tests/test-https.cpp b/tests/test-https.cpp
new file mode 100644
index 0000000..dcd33d7
--- /dev/null
+++ b/tests/test-https.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "archive.h"
+
+using namespace std::string_literals;
+
+class HTTPSFixture
+{
+public:
+ HTTPSFixture(){}
+ ~HTTPSFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(https, HTTPSFixture)
+{
+}
+
diff --git a/tests/test-plugin.cpp b/tests/test-plugin.cpp
new file mode 100644
index 0000000..d908bc7
--- /dev/null
+++ b/tests/test-plugin.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "plugin.h"
+
+using namespace std::string_literals;
+
+class PluginFixture
+{
+public:
+ PluginFixture(){}
+ ~PluginFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(plugin, PluginFixture)
+{
+}
+
diff --git a/tests/test-privileges.cpp b/tests/test-privileges.cpp
new file mode 100644
index 0000000..51500ea
--- /dev/null
+++ b/tests/test-privileges.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "privileges.h"
+
+using namespace std::string_literals;
+
+class PrivilegesFixture
+{
+public:
+ PrivilegesFixture(){}
+ ~PrivilegesFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(privileges, PrivilegesFixture)
+{
+}
+
diff --git a/tests/test-response.cpp b/tests/test-response.cpp
new file mode 100644
index 0000000..3f83a6d
--- /dev/null
+++ b/tests/test-response.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "response.h"
+
+using namespace std::string_literals;
+
+class ResponseFixture
+{
+public:
+ ResponseFixture(){}
+ ~ResponseFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(response, ResponseFixture)
+{
+}
+
diff --git a/tests/test-server.cpp b/tests/test-server.cpp
new file mode 100644
index 0000000..b042be4
--- /dev/null
+++ b/tests/test-server.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "server.h"
+
+using namespace std::string_literals;
+
+class ServerFixture
+{
+public:
+ ServerFixture(){}
+ ~ServerFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(server, ServerFixture)
+{
+}
+
diff --git a/tests/test-statistics.cpp b/tests/test-statistics.cpp
new file mode 100644
index 0000000..9ed7d06
--- /dev/null
+++ b/tests/test-statistics.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+
+#include <sstream>
+#include <string>
+
+#include "statistics.h"
+
+using namespace std::string_literals;
+
+class StatisticsFixture
+{
+public:
+ StatisticsFixture(){}
+ ~StatisticsFixture(){}
+ void setup(){}
+ void teardown(){}
+};
+
+BOOST_FIXTURE_TEST_CASE(statistics, StatisticsFixture)
+{
+}
+