|
13 | 13 | import org.junit.jupiter.api.Test; |
14 | 14 |
|
15 | 15 | /** |
16 | | - * Integration tests for Team Usage Stats API. Uses dedicated test credentials from |
17 | | - * STREAM_USAGE_STATS_KEY and STREAM_USAGE_STATS_SECRET environment variables. |
| 16 | + * Integration tests for Team Usage Stats API. Uses dedicated multi-tenant test app credentials from |
| 17 | + * STREAM_MULTI_TENANT_KEY and STREAM_MULTI_TENANT_SECRET environment variables. |
18 | 18 | * |
19 | 19 | * <p>These tests verify that the SDK correctly parses all response data from the backend. |
20 | 20 | */ |
21 | 21 | public class TeamUsageStatsIntegrationTest { |
22 | 22 |
|
23 | 23 | @BeforeAll |
24 | 24 | static void setup() { |
25 | | - // Use dedicated credentials for usage stats testing |
26 | | - String apiKey = System.getenv("STREAM_USAGE_STATS_KEY"); |
27 | | - String apiSecret = System.getenv("STREAM_USAGE_STATS_SECRET"); |
| 25 | + String apiKey = System.getenv("STREAM_MULTI_TENANT_KEY"); |
| 26 | + String apiSecret = System.getenv("STREAM_MULTI_TENANT_SECRET"); |
28 | 27 |
|
29 | | - // Fall back to standard credentials if usage stats specific ones aren't set |
30 | | - if (apiKey == null || apiKey.isEmpty()) { |
31 | | - apiKey = System.getenv("STREAM_KEY"); |
32 | | - } |
33 | | - if (apiSecret == null || apiSecret.isEmpty()) { |
34 | | - apiSecret = System.getenv("STREAM_SECRET"); |
35 | | - } |
36 | | - |
37 | | - if (apiKey == null || apiSecret == null) { |
| 28 | + if (apiKey == null || apiKey.isEmpty() || apiSecret == null || apiSecret.isEmpty()) { |
38 | 29 | throw new IllegalStateException( |
39 | | - "Missing credentials. Set STREAM_USAGE_STATS_KEY/STREAM_USAGE_STATS_SECRET or" |
40 | | - + " STREAM_KEY/STREAM_SECRET"); |
| 30 | + "Multi-tenant test app credentials are missing. " |
| 31 | + + "Set STREAM_MULTI_TENANT_KEY and STREAM_MULTI_TENANT_SECRET environment variables."); |
41 | 32 | } |
42 | 33 |
|
43 | 34 | Properties props = new Properties(); |
|
0 commit comments