feat:support TSF router.

pull/1420/head
fuyuwei01 1 year ago
parent 336c5f81d6
commit 1cc2aac7dd

@ -19,7 +19,7 @@ package com.tencent.cloud.polaris.context;
import com.tencent.cloud.common.metadata.StaticMetadataManager;
import com.tencent.polaris.api.plugin.common.ValueContext;
import com.tencent.polaris.api.plugin.route.LocationLevel;
import com.tencent.polaris.specification.api.v1.traffic.manage.RoutingProto;
import com.tencent.polaris.client.api.SDKContext;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
@ -55,9 +55,9 @@ public final class PostInitPolarisSDKContextTest {
when(staticMetadataManager.getCampus()).thenReturn(CAMPUS);
new PostInitPolarisSDKContext(sdkContext, staticMetadataManager);
String regionName = valueContext.getValue(LocationLevel.region.name());
String zoneName = valueContext.getValue(LocationLevel.zone.name());
String campusName = valueContext.getValue(LocationLevel.campus.name());
String regionName = valueContext.getValue(RoutingProto.NearbyRoutingConfig.LocationLevel.REGION.name());
String zoneName = valueContext.getValue(RoutingProto.NearbyRoutingConfig.LocationLevel.ZONE.name());
String campusName = valueContext.getValue(RoutingProto.NearbyRoutingConfig.LocationLevel.CAMPUS.name());
Assertions.assertThat(regionName).isEqualTo(REGION);
Assertions.assertThat(zoneName).isEqualTo(ZONE);

Loading…
Cancel
Save