summaryrefslogtreecommitdiff
path: root/test/testing-util.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-01-18 01:36:06 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-01-18 01:36:06 +0000
commit04acfa679fd846ac829ded5562093b3766c85154 (patch)
treea9625eb96c8c4ed246b1f4d172c06d85df577dfe /test/testing-util.cpp
parent34051da2f27ffa40d0b6d20ae891a497fe73bfe5 (diff)
downloadwebstat-04acfa679fd846ac829ded5562093b3766c85154.tar.bz2
webstat-04acfa679fd846ac829ded5562093b3766c85154.tar.xz
webstat-04acfa679fd846ac829ded5562093b3766c85154.zip
Process new field, content-type, in input streamHEADmain
Diffstat (limited to 'test/testing-util.cpp')
-rw-r--r--test/testing-util.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/testing-util.cpp b/test/testing-util.cpp
index 010b2c6..6e75354 100644
--- a/test/testing-util.cpp
+++ b/test/testing-util.cpp
@@ -34,6 +34,7 @@ namespace WebStat {
std::vector<std::string> qss;
std::vector<std::string> refs;
std::vector<std::string> uas;
+ std::vector<std::string> ct;
};
Strings strings;
@@ -65,6 +66,7 @@ namespace WebStat {
{strings.qss, 100, getStrGen(1, 50)},
{strings.refs, 50, getStrGen(10, 50)},
{strings.uas, 10, getStrGen(50, 70)},
+ {strings.ct, 10, getStrGen(10, 20)},
}) {
std::generate_n(std::back_inserter(out), count, stringGenerator);
}
@@ -86,10 +88,11 @@ namespace WebStat {
std::ofstream logfile {path};
for (size_t line = 0; line < entries; ++line) {
- std::println(logfile, R"LOG({} {} {} GET "/{}" "?{}" HTTP/1.1 200 {} {} "{}" "{}")LOG",
+ std::println(logfile, R"LOG({} {} {} GET "/{}" "?{}" HTTP/1.1 200 {} {} "{}" "{}" "{}")LOG",
randomString(strings.vhosts), randomString(strings.ips), tick += tickDistrib(generator),
randomString(strings.paths), randomString(strings.qss), sizeDistrib(generator),
- durationDistrib(generator), randomString(strings.refs), randomString(strings.uas));
+ durationDistrib(generator), randomString(strings.refs), randomString(strings.uas),
+ randomString(strings.ct));
}
}