Validate all conduit deployments in stat test (#1048)

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
This commit is contained in:
Kevin Lingerfelt 2018-06-04 16:43:42 -07:00 committed by GitHub
parent 43c16f2407
commit c646185120
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -32,18 +32,18 @@ type rowStat struct {
secured string secured string
} }
var controllerDeployments = []string{"controller", "grafana", "prometheus", "web"}
////////////////////// //////////////////////
/// TEST EXECUTION /// /// TEST EXECUTION ///
////////////////////// //////////////////////
// This test retries for up to 20 seconds, since each call to "conduit stat" // This test retries for up to 20 seconds, since each call to "conduit stat"
// generates traffic to the controller and prometheus deployments in the conduit // generates traffic to the deployments in the conduit namespace, and we're
// namespace, and we're testing that those deployments are properly reporting // testing that those deployments are properly reporting stats. It's ok if the
// stats. It's ok if the first few attempts fail due to missing stats, since the // first few attempts fail due to missing stats, since the requests from those
// requests from those failed attempts will eventually be recorded in the stats // failed attempts will eventually be recorded in the stats that we're
// that we're requesting, and the test will pass. Note that we're not validating // requesting, and the test will pass.
// stats for the web and grafana deployments, since we aren't guaranteeing that
// they're receiving traffic as part of this test.
func TestCliStatForConduitNamespace(t *testing.T) { func TestCliStatForConduitNamespace(t *testing.T) {
err := TestHelper.RetryFor(20*time.Second, func() error { err := TestHelper.RetryFor(20*time.Second, func() error {
@ -57,7 +57,7 @@ func TestCliStatForConduitNamespace(t *testing.T) {
return err return err
} }
for _, name := range []string{"controller", "prometheus"} { for _, name := range controllerDeployments {
if err := validateRowStats(name, rowStats); err != nil { if err := validateRowStats(name, rowStats); err != nil {
return err return err
} }