Skip to content

Commit f605497

Browse files
committed
feat: remove explicit host setting in AssetTestCase to enable region-based host resolution
1 parent 9d7a767 commit f605497

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

contentstack/src/androidTest/java/com/contentstack/sdk/AssetTestCase.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@ public void test_AZURE_NA() throws Exception {
162162
String DEFAULT_API_KEY = BuildConfig.APIKey;
163163
String DEFAULT_DELIVERY_TOKEN = BuildConfig.deliveryToken;
164164
String DEFAULT_ENV = BuildConfig.environment;
165-
String DEFAULT_HOST = BuildConfig.host;
166-
config.setHost(DEFAULT_HOST);
167165
config.setRegion(Config.ContentstackRegion.AZURE_NA);
166+
// Host is resolved from the region; no explicit setHost() so region resolution applies
168167
Context appContext = InstrumentationRegistry.getTargetContext();
169168
stack = Contentstack.stack(appContext, DEFAULT_API_KEY, DEFAULT_DELIVERY_TOKEN, DEFAULT_ENV, config);
170169
assertEquals("azure-na-cdn.contentstack.com", config.getHost());
@@ -189,9 +188,8 @@ public void test_GCP_NA() throws Exception {
189188
String DEFAULT_API_KEY = BuildConfig.APIKey;
190189
String DEFAULT_DELIVERY_TOKEN = BuildConfig.deliveryToken;
191190
String DEFAULT_ENV = BuildConfig.environment;
192-
String DEFAULT_HOST = BuildConfig.host;
193-
config.setHost(DEFAULT_HOST);
194191
config.setRegion(Config.ContentstackRegion.GCP_NA);
192+
// Host is resolved from the region; no explicit setHost() so region resolution applies
195193
Context appContext = InstrumentationRegistry.getTargetContext();
196194
stack = Contentstack.stack(appContext, DEFAULT_API_KEY, DEFAULT_DELIVERY_TOKEN, DEFAULT_ENV, config);
197195
assertEquals("gcp-na-cdn.contentstack.com", config.getHost());

0 commit comments

Comments
 (0)