diff options
author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2025-09-02 16:13:22 +0100 |
---|---|---|
committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2025-09-02 16:13:22 +0100 |
commit | ca9be55a98c094e8026a4003a099573dd4137050 (patch) | |
tree | 1d58e13a84fc6bba25242877859027bdfe8f461e /test/test-util.cpp | |
parent | 07a98c0ba7d2fdd79cab1884f81bb041741fc18c (diff) | |
download | webstat-ca9be55a98c094e8026a4003a099573dd4137050.tar.bz2 webstat-ca9be55a98c094e8026a4003a099573dd4137050.tar.xz webstat-ca9be55a98c094e8026a4003a099573dd4137050.zip |
Store utsname details in the host's detail field
Diffstat (limited to 'test/test-util.cpp')
-rw-r--r-- | test/test-util.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test-util.cpp b/test/test-util.cpp index 4648498..b9011a4 100644 --- a/test/test-util.cpp +++ b/test/test-util.cpp @@ -11,4 +11,12 @@ namespace WebStat { { return DB::MockDatabase::openConnectionTo(name); } + + utsname + getTestUtsName(const std::string_view nodename) + { + utsname uts {}; + nodename.copy(uts.nodename, sizeof(uts.nodename)); + return uts; + } } |