Aktualizr
C++ SOTA Client
|
#include <gtest/gtest.h>
#include <sys/stat.h>
#include <fstream>
#include <map>
#include <random>
#include <set>
#include <boost/algorithm/hex.hpp>
#include <boost/archive/iterators/dataflow_exception.hpp>
#include "libaktualizr/types.h"
#include "utilities/utils.h"
Go to the source code of this file.
Functions | |
bool | CharOk (char c) |
bool | PrettyNameOk (const std::string &name) |
TEST (Utils, PrettyNameOk) | |
TEST (Utils, parseJSON) | |
TEST (Utils, jsonToCanonicalStr) | |
TEST (Utils, getHardwareInfo) | |
TEST (Utils, getNetworkInfo) | |
TEST (Utils, getHostname) | |
TEST (Utils, GenPrettyNameSane) | |
Check that aktualizr can generate a pet name. More... | |
TEST (Utils, RandomUuidSane) | |
TEST (Utils, ToBase64) | |
TEST (Utils, FromBase64) | |
TEST (Utils, FromBase64Wrong) | |
TEST (Utils, Base64RoundTrip) | |
TEST (Utils, ArchiveRead) | |
TEST (Utils, ArchiveWrite) | |
TEST (Utils, ArchiveRemoveFile) | |
TEST (Utils, TemporaryDirectory) | |
TEST (Utils, TemporaryFile) | |
TEST (Utils, TemporaryFilePutContents) | |
TEST (Utils, copyDir) | |
TEST (Utils, writeFileWithoutDirAutoCreation) | |
TEST (Utils, writeFileWithDirAutoCreation) | |
TEST (Utils, writeFileWithDirAutoCreationDefault) | |
TEST (Utils, writeFileWithoutDirAutoCreationException) | |
TEST (Utils, writeFileJson) | |
TEST (Utils, shell) | |
TEST (Utils, createSecureDirectory) | |
TEST (Utils, urlencode) | |
TEST (Utils, getDirEntriesByExt) | |
TEST (Utils, BasedPath) | |
TEST (Utils, TrimNewline) | |
int | main (int argc, char **argv) |
TEST | ( | Utils | , |
GenPrettyNameSane | |||
) |
Check that aktualizr can generate a pet name.
Try 100 times and check that no duplicate names are produced. Tolerate 1 duplicate, since we have actually seen it before and it is statistically not unreasonable with our current inputs.
Definition at line 92 of file utils_test.cc.