Add config validator to y2023
Doesn't catch every error, but still worth having here so we keep adding
it in future years.
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
Change-Id: I78703b74aa8f80eed1840d78a1f84478e2f60f14
diff --git a/aos/util/config_validator.cc b/aos/util/config_validator.cc
index 78bd0b1..d5bd6ba 100644
--- a/aos/util/config_validator.cc
+++ b/aos/util/config_validator.cc
@@ -1,4 +1,5 @@
#include <chrono>
+
#include "aos/configuration.h"
#include "aos/events/logging/log_reader.h"
#include "aos/events/logging/log_writer.h"
@@ -9,8 +10,7 @@
#include "gflags/gflags.h"
#include "gtest/gtest.h"
-DEFINE_string(config, "",
- "Name of the config file to replay using.");
+DEFINE_string(config, "", "Name of the config file to replay using.");
/* This binary is used to validate that all of the
needed remote timestamps channels are in the config
to log the timestamps.
@@ -18,8 +18,8 @@
to confirm that the timestamps in the config are able to
replay all of the data in the log
This can be done by getting a list of all of the nodes and
- iterating through it with a for loop creating a logger for
- each one
+ iterating through it with a for loop creating a logger for
+ each one
Reference superstructure_lib_test.cc*/
TEST(ConfigValidatorTest, ReadConfig) {
ASSERT_TRUE(!FLAGS_config.empty());
@@ -30,3 +30,7 @@
factory.RunFor(std::chrono::seconds(1));
}
+
+// TODO(milind): add more tests, the above one doesn't
+// catch an error like forgetting to add a forwarded message to
+// the destination node's config.