[1.17.x] Move test setup out of subtest (#19754)

Move test setup out of subtest
backport/zalimeni/net-6725-fix-sidecarproxycontroller-flake/primarily-logical-stingray
Chris S. Kim 2023-11-29 09:35:20 -05:00 committed by GitHub
parent 1549522513
commit 131098159b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 7 deletions

View File

@ -521,13 +521,11 @@ func (suite *controllerTestSuite) TestController() {
webComputedDestinations *pbresource.Resource
)
testutil.RunStep(suite.T(), "proxy state template generation", func(t *testing.T) {
// Check that proxy state template resource is generated for both the api and web workloads.
retry.Run(t, func(r *retry.R) {
suite.client.RequireResourceExists(r, apiProxyStateTemplateID)
webProxyStateTemplate = suite.client.RequireResourceExists(r, webProxyStateTemplateID)
apiProxyStateTemplate = suite.client.RequireResourceExists(r, apiProxyStateTemplateID)
})
// Check that proxy state template resource is generated for both the api and web workloads.
retry.Run(suite.T(), func(r *retry.R) {
suite.client.RequireResourceExists(r, apiProxyStateTemplateID)
webProxyStateTemplate = suite.client.RequireResourceExists(r, webProxyStateTemplateID)
apiProxyStateTemplate = suite.client.RequireResourceExists(r, apiProxyStateTemplateID)
})
// Write a default ComputedRoutes for api.