@@ -46,12 +46,11 @@ func TestDatanodeConfigGenerator(t *testing.T) {
4646 defer file .Close ()
4747
4848 opts := & Options {
49- ConfigPath : file .Name (),
50- InitConfigPath : "testdata/datanode-config.toml" ,
51- Namespace : testClusterNamespace ,
52- RoleKind : string (v1alpha1 .DatanodeRoleKind ),
53- DatanodeRPCPort : testRPCPort ,
54- DatanodeServiceName : testClusterService ,
49+ ConfigPath : file .Name (),
50+ InitConfigPath : "testdata/datanode-config.toml" ,
51+ Namespace : testClusterNamespace ,
52+ RoleKind : string (v1alpha1 .DatanodeRoleKind ),
53+ RPCPort : testRPCPort ,
5554 }
5655
5756 t .Setenv (deployer .EnvPodIP , testPodIP )
@@ -93,7 +92,7 @@ func TestDatanodeConfigGenerator(t *testing.T) {
9392 if ! ok {
9493 t .Fatalf ("grpc server_addr is not string" )
9594 }
96- wantRPCServerAddr := fmt .Sprintf ("%s.%s.%s :%d" , testDatanodePodName , testClusterService , testClusterNamespace , testRPCPort )
95+ wantRPCServerAddr := fmt .Sprintf ("%s:%d" , testPodIP , testRPCPort )
9796 if ! reflect .DeepEqual (wantRPCServerAddr , rpcServerAddr ) {
9897 t .Fatalf ("RPCServerAddr is not equal, want: '%s', got: '%s'" , wantRPCServerAddr , rpcServerAddr )
9998 }
@@ -112,7 +111,6 @@ func TestFlownodeConfigGenerator(t *testing.T) {
112111 Namespace : testClusterNamespace ,
113112 RoleKind : string (v1alpha1 .FlownodeRoleKind ),
114113 RPCPort : testRPCPort ,
115- ServiceName : testClusterService ,
116114 }
117115
118116 t .Setenv (deployer .EnvPodIP , testPodIP )
@@ -154,7 +152,7 @@ func TestFlownodeConfigGenerator(t *testing.T) {
154152 if ! ok {
155153 t .Fatalf ("grpc server_addr is not string" )
156154 }
157- wantRPCServerAddr := fmt .Sprintf ("%s.%s.%s :%d" , testFlownodePodName , testClusterService , testClusterNamespace , testRPCPort )
155+ wantRPCServerAddr := fmt .Sprintf ("%s:%d" , testPodIP , testRPCPort )
158156 if ! reflect .DeepEqual (wantRPCServerAddr , rpcServerAddr ) {
159157 t .Fatalf ("RPCServerAddr is not equal, want: '%s', got: '%s'" , wantRPCServerAddr , rpcServerAddr )
160158 }
@@ -170,13 +168,12 @@ func TestDatanodeConfigGeneratorWithDatanodeGroupID(t *testing.T) {
170168 defer tmpConfigFile .Close ()
171169
172170 opts := & Options {
173- ConfigPath : tmpConfigFile .Name (),
174- InitConfigPath : "testdata/datanode-config.toml" ,
175- Namespace : testClusterNamespace ,
176- RoleKind : string (v1alpha1 .DatanodeRoleKind ),
177- DatanodeRPCPort : testRPCPort ,
178- DatanodeServiceName : testClusterService ,
179- DatanodeGroupID : testDatanodeGroupID ,
171+ ConfigPath : tmpConfigFile .Name (),
172+ InitConfigPath : "testdata/datanode-config.toml" ,
173+ Namespace : testClusterNamespace ,
174+ RoleKind : string (v1alpha1 .DatanodeRoleKind ),
175+ RPCPort : testRPCPort ,
176+ DatanodeGroupID : testDatanodeGroupID ,
180177 }
181178
182179 t .Setenv (deployer .EnvPodIP , testPodIP )
0 commit comments