Configs.java 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. package io.opentelemetry.config;
  6. import io.opentelemetry.agents.Agent;
  7. import java.util.Arrays;
  8. import java.util.stream.Stream;
  9. /**
  10. * Defines all test configurations
  11. */
  12. public enum Configs {
  13. RELEASE(TestConfig.builder()
  14. .name("release")
  15. .description("compares the latest stable release to no agent")
  16. .withAgents(Agent.NONE, Agent.LATEST_RELEASE)
  17. .build()
  18. ),
  19. SNAPSHOT(TestConfig.builder()
  20. .name("snapshot")
  21. .description("compares the latest snapshot to no agent")
  22. .withAgents(Agent.NONE, Agent.LATEST_SNAPSHOT)
  23. .build()
  24. ),
  25. SNAPSHOT_REGRESSION(TestConfig.builder()
  26. .name("snapshot-regression")
  27. .description("compares the latest snapshot to the latest stable release")
  28. .withAgents(Agent.LATEST_RELEASE, Agent.LATEST_SNAPSHOT)
  29. .build()
  30. )
  31. ;
  32. public final TestConfig config;
  33. public static Stream<TestConfig> all(){
  34. return Arrays.stream(Configs.values()).map(x -> x.config);
  35. }
  36. Configs(TestConfig config) {
  37. this.config = config;
  38. }
  39. }