|
|
|
@ -124,6 +124,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'no-srv-ipv4-single-target.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '5.5.5.5:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -138,6 +139,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv4-single-target.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:1234,True', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -152,6 +154,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv4-multi-target.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.5:1234,True;1.2.3.6:1234,True;1.2.3.7:1234,True', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -166,6 +169,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv6-single-target.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '[2607:f8b0:400a:801::1001]:1234,True', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -180,6 +184,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv6-multi-target.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '[2607:f8b0:400a:801::1002]:1234,True;[2607:f8b0:400a:801::1003]:1234,True;[2607:f8b0:400a:801::1004]:1234,True', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -194,6 +199,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv4-simple-service-config.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:1234,True', |
|
|
|
|
'--expected_chosen_service_config', '{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"SimpleService"}],"waitForReady":true}]}', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', 'round_robin', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -208,6 +214,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'ipv4-no-srv-simple-service-config.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"NoSrvSimpleService"}],"waitForReady":true}]}', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', 'round_robin', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -222,6 +229,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'ipv4-no-config-for-cpp.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -236,6 +244,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'ipv4-cpp-config-has-zero-percentage.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -250,6 +259,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'ipv4-second-language-is-cpp.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"CppService"}],"waitForReady":true}]}', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', 'round_robin', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -264,6 +274,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'ipv4-config-with-percentages.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"AlwaysPickedService"}],"waitForReady":true}]}', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', 'round_robin', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -278,6 +289,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:1234,True;1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -292,6 +304,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '[2607:f8b0:400a:801::1002]:1234,True;[2607:f8b0:400a:801::1002]:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -306,6 +319,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'ipv4-config-causing-fallback-to-tcp.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooTwo","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooThree","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooFour","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooFive","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooSix","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooSeven","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooEight","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooNine","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooTen","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooEleven","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooTwelve","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooTwelve","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooTwelve","service":"SimpleService"}],"waitForReady":true},{"name":[{"method":"FooTwelve","service":"SimpleService"}],"waitForReady":true}]}', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -320,6 +334,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv4-single-target-srv-disabled.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '2.3.4.5:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'False', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -334,6 +349,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv4-multi-target-srv-disabled.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '9.2.3.5:443,False;9.2.3.6:443,False;9.2.3.7:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'False', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -348,6 +364,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv6-single-target-srv-disabled.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '[2600::1001]:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'False', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -362,6 +379,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv6-multi-target-srv-disabled.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '[2600::1002]:443,False;[2600::1003]:443,False;[2600::1004]:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'False', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -376,6 +394,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv4-simple-service-config-srv-disabled.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '5.5.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"SimpleService"}],"waitForReady":true}]}', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', 'round_robin', |
|
|
|
|
'--enable_srv_queries', 'False', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
@ -390,6 +409,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'srv-ipv4-simple-service-config-txt-disabled.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:1234,True', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'False', |
|
|
|
@ -404,6 +424,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'ipv4-cpp-config-has-zero-percentage-txt-disabled.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'False', |
|
|
|
@ -418,6 +439,7 @@ current_test_subprocess = subprocess.Popen([ |
|
|
|
|
'--target_name', 'ipv4-second-language-is-cpp-txt-disabled.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', '', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'False', |
|
|
|
@ -426,6 +448,66 @@ current_test_subprocess.communicate() |
|
|
|
|
if current_test_subprocess.returncode != 0: |
|
|
|
|
num_test_failures += 1 |
|
|
|
|
|
|
|
|
|
test_runner_log('Run test with target: %s' % 'ipv4-svc_cfg_bad_json.resolver-tests-version-4.grpctestingexp.') |
|
|
|
|
current_test_subprocess = subprocess.Popen([ |
|
|
|
|
args.test_bin_path, |
|
|
|
|
'--target_name', 'ipv4-svc_cfg_bad_json.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', 'could not parse', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
|
'--local_dns_server_address', '127.0.0.1:%d' % args.dns_server_port]) |
|
|
|
|
current_test_subprocess.communicate() |
|
|
|
|
if current_test_subprocess.returncode != 0: |
|
|
|
|
num_test_failures += 1 |
|
|
|
|
|
|
|
|
|
test_runner_log('Run test with target: %s' % 'ipv4-svc_cfg_bad_client_language.resolver-tests-version-4.grpctestingexp.') |
|
|
|
|
current_test_subprocess = subprocess.Popen([ |
|
|
|
|
args.test_bin_path, |
|
|
|
|
'--target_name', 'ipv4-svc_cfg_bad_client_language.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', 'field:clientLanguage error:should be of type array', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
|
'--local_dns_server_address', '127.0.0.1:%d' % args.dns_server_port]) |
|
|
|
|
current_test_subprocess.communicate() |
|
|
|
|
if current_test_subprocess.returncode != 0: |
|
|
|
|
num_test_failures += 1 |
|
|
|
|
|
|
|
|
|
test_runner_log('Run test with target: %s' % 'ipv4-svc_cfg_bad_percentage.resolver-tests-version-4.grpctestingexp.') |
|
|
|
|
current_test_subprocess = subprocess.Popen([ |
|
|
|
|
args.test_bin_path, |
|
|
|
|
'--target_name', 'ipv4-svc_cfg_bad_percentage.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', 'field:percentage error:should be of type number', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
|
'--local_dns_server_address', '127.0.0.1:%d' % args.dns_server_port]) |
|
|
|
|
current_test_subprocess.communicate() |
|
|
|
|
if current_test_subprocess.returncode != 0: |
|
|
|
|
num_test_failures += 1 |
|
|
|
|
|
|
|
|
|
test_runner_log('Run test with target: %s' % 'ipv4-svc_cfg_bad_wait_for_ready.resolver-tests-version-4.grpctestingexp.') |
|
|
|
|
current_test_subprocess = subprocess.Popen([ |
|
|
|
|
args.test_bin_path, |
|
|
|
|
'--target_name', 'ipv4-svc_cfg_bad_wait_for_ready.resolver-tests-version-4.grpctestingexp.', |
|
|
|
|
'--expected_addrs', '1.2.3.4:443,False', |
|
|
|
|
'--expected_chosen_service_config', '', |
|
|
|
|
'--expected_service_config_error', 'field:waitForReady error:Type should be true/false', |
|
|
|
|
'--expected_lb_policy', '', |
|
|
|
|
'--enable_srv_queries', 'True', |
|
|
|
|
'--enable_txt_queries', 'True', |
|
|
|
|
'--local_dns_server_address', '127.0.0.1:%d' % args.dns_server_port]) |
|
|
|
|
current_test_subprocess.communicate() |
|
|
|
|
if current_test_subprocess.returncode != 0: |
|
|
|
|
num_test_failures += 1 |
|
|
|
|
|
|
|
|
|
test_runner_log('now kill DNS server') |
|
|
|
|
dns_server_subprocess.kill() |
|
|
|
|
dns_server_subprocess.wait() |
|
|
|
|