@@ -94,8 +94,8 @@ type hostTrafficDynamicPathEnv struct {
9494
9595type hostTrafficDynamicPathSuite struct {
9696 e2e.BaseSuite [hostTrafficDynamicPathEnv ]
97- remoteConfigAdded bool
98- preserveInitialPayloads bool
97+ remoteConfigAdded bool
98+ skipRemoteConfig bool
9999}
100100
101101type baselineHostTrafficDynamicPathSuite struct {
@@ -110,7 +110,7 @@ func TestHostTrafficDynamicPathSuite(t *testing.T) {
110110// TestBaselineHostTrafficDynamicPathSuite verifies baseline tests from packaged Agent configuration through fakeintake.
111111func TestBaselineHostTrafficDynamicPathSuite (t * testing.T ) {
112112 suite := & baselineHostTrafficDynamicPathSuite {
113- hostTrafficDynamicPathSuite : hostTrafficDynamicPathSuite {preserveInitialPayloads : true },
113+ hostTrafficDynamicPathSuite : hostTrafficDynamicPathSuite {skipRemoteConfig : true },
114114 }
115115 e2e .Run (t , suite , e2e .WithProvisioner (hostTrafficDynamicPathProvisioner ("baselineHostTrafficDynamicPath" , baselineHostTrafficDynamicPathAgentConfig , baselineHostTrafficSystemProbeConfig )))
116116}
@@ -183,6 +183,11 @@ func (s *hostTrafficDynamicPathSuite) SetupSuite() {
183183 s .assertHostTrafficDomainResolves ()
184184
185185 fakeintake := s .Env ().FakeIntake .Client ()
186+ if s .skipRemoteConfig {
187+ require .NoError (s .T (), fakeintake .FlushServerAndResetAggregators ())
188+ return
189+ }
190+
186191 s .EventuallyWithT (func (c * assert.CollectT ) {
187192 stats , err := fakeintake .RCStats ()
188193 assert .NoError (c , err )
@@ -198,9 +203,7 @@ func (s *hostTrafficDynamicPathSuite) SetupSuite() {
198203 assert .Greater (c , stats .Polls , statsAfterAdd .Polls , "agent did not poll Remote Config after the dynamic config was added" )
199204 }, 2 * time .Minute , 5 * time .Second )
200205
201- if ! s .preserveInitialPayloads {
202- require .NoError (s .T (), fakeintake .FlushServerAndResetAggregators ())
203- }
206+ require .NoError (s .T (), fakeintake .FlushServerAndResetAggregators ())
204207}
205208
206209func (s * hostTrafficDynamicPathSuite ) TearDownSuite () {
@@ -285,9 +288,6 @@ func (s *baselineHostTrafficDynamicPathSuite) TestHostTrafficDynamicNetworkPath(
285288 assert .Equal (c , uint16 (80 ), match .Destination .Port )
286289 require .NotEmpty (c , match .Traceroute .Runs , "matched network path has no traceroute runs" )
287290 assert .True (c , hasTracerouteDestinationIP (match ), "matched network path has no traceroute destination IP" )
288- assert .Empty (c , match .TestConfigID , "baseline test unexpectedly inherited Remote Config attribution" )
289- assert .Empty (c , match .TestConfigSource , "baseline test unexpectedly inherited Remote Config attribution" )
290- assert .Empty (c , match .Tags , "baseline test unexpectedly inherited Remote Config tags" )
291291 }, 5 * time .Minute , 10 * time .Second )
292292}
293293
396396func (s * hostTrafficDynamicPathSuite ) assertHostTrafficDomainResolves () {
397397 output := s .Env ().RemoteHost .MustExecute ("getent ahostsv4 " + shellQuote (hostTrafficRemoteConfigDomain ))
398398 require .Contains (s .T (), output , s .Env ().HTTPBinHost .Address )
399-
400- s .Env ().RemoteHost .MustExecute (fmt .Sprintf ("curl -4 -fsS --retry 3 --max-time 5 %s >/dev/null" , shellQuote (hostTrafficURL (hostTrafficRemoteConfigDomain ))))
401399}
402400
403401func (s * hostTrafficDynamicPathSuite ) startHostTrafficGenerator (duration time.Duration ) {
0 commit comments