traeak commented on code in PR #13837:
URL: https://github.com/apache/trafficserver/pull/13837#discussion_r4282866740
##########
src/proxy/http/remap/unit-tests/test_NextHopStrategyFactory.cc:
##########
@@ -40,6 +40,18 @@
SCENARIO("factory tests loading yaml configs", "[loadConfig]")
{
+ GIVEN("Loading a strategy.yaml with a bare '#include' directive.")
+ {
+ REQUIRE_NOTHROW(YAML::LoadFile(TS_SRC_DIR
"/include-missing-strategy.yaml"));
+ NextHopStrategyFactory nhf(TS_SRC_DIR "/include-missing-strategy.yaml");
+
+ THEN("the bare directive is rejected and no strategies load")
+ {
+ REQUIRE(nhf.strategies_loaded == false);
+ REQUIRE(nhf.strategyInstance("strategy-1") == nullptr);
+ }
+ }
Review Comment:
TS_SRC_DIR is always defined for this target under CMake
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]