22
33require 'fileutils'
44require 'pathname'
5+ require 'tmpdir'
56require 'temporalio/client'
67require 'temporalio/envconfig'
78require_relative 'test'
@@ -93,7 +94,7 @@ def test_load_profile_from_file_custom
9394 assert_equal 'custom-address' , profile . address
9495 assert_equal 'custom-namespace' , profile . namespace
9596 refute_nil profile . tls
96- assert_equal 'custom-server-name' , profile . tls . server_name
97+ assert_equal 'custom-server-name' , profile . tls . server_name # steep:ignore
9798 assert_equal 'custom-value' , profile . grpc_meta [ 'custom-header' ]
9899
99100 config = profile . to_client_connect_config
@@ -123,7 +124,7 @@ def test_load_profile_from_data_custom
123124 assert_equal 'custom-address' , profile . address
124125 assert_equal 'custom-namespace' , profile . namespace
125126 refute_nil profile . tls
126- assert_equal 'custom-server-name' , profile . tls . server_name
127+ assert_equal 'custom-server-name' , profile . tls . server_name # steep:ignore
127128 assert_equal 'custom-value' , profile . grpc_meta [ 'custom-header' ]
128129
129130 config = profile . to_client_connect_config
@@ -166,7 +167,7 @@ def test_load_profile_env_overrides
166167 assert_equal 'env-namespace' , profile . namespace
167168 assert_equal 'env-api-key' , profile . api_key
168169 refute_nil profile . tls
169- assert_equal 'env-server-name' , profile . tls . server_name
170+ assert_equal 'env-server-name' , profile . tls . server_name # steep:ignore
170171
171172 config = profile . to_client_connect_config
172173 assert_equal 'env-address' , config [ :target_host ]
@@ -369,7 +370,7 @@ def test_load_profile_tls_options
369370 config_source : TOML_CONFIG_TLS_DETAILED , profile : 'tls_disabled'
370371 )
371372 refute_nil profile_disabled . tls
372- assert profile_disabled . tls . disabled
373+ assert profile_disabled . tls . disabled # steep:ignore
373374
374375 config_disabled = profile_disabled . to_client_connect_config
375376 assert_equal false , config_disabled [ :tls ]
@@ -379,13 +380,13 @@ def test_load_profile_tls_options
379380 config_source : TOML_CONFIG_TLS_DETAILED , profile : 'tls_with_certs'
380381 )
381382 refute_nil profile_certs . tls
382- assert_equal 'custom-server' , profile_certs . tls . server_name
383- refute_nil profile_certs . tls . server_root_ca_cert
384- assert_equal 'ca-pem-data' , profile_certs . tls . server_root_ca_cert
385- refute_nil profile_certs . tls . client_cert
386- assert_equal 'client-crt-data' , profile_certs . tls . client_cert
387- refute_nil profile_certs . tls . client_private_key
388- assert_equal 'client-key-data' , profile_certs . tls . client_private_key
383+ assert_equal 'custom-server' , profile_certs . tls . server_name # steep:ignore
384+ refute_nil profile_certs . tls . server_root_ca_cert # steep:ignore
385+ assert_equal 'ca-pem-data' , profile_certs . tls . server_root_ca_cert # steep:ignore
386+ refute_nil profile_certs . tls . client_cert # steep:ignore
387+ assert_equal 'client-crt-data' , profile_certs . tls . client_cert # steep:ignore
388+ refute_nil profile_certs . tls . client_private_key # steep:ignore
389+ assert_equal 'client-key-data' , profile_certs . tls . client_private_key # steep:ignore
389390
390391 config_certs = profile_certs . to_client_connect_config
391392 tls_config_certs = config_certs [ :tls ]
@@ -397,7 +398,7 @@ def test_load_profile_tls_options
397398 end
398399
399400 def test_load_profile_tls_from_paths
400- Dir . mktmpdir do |tmpdir |
401+ Dir . mktmpdir do |tmpdir | # steep:ignore
401402 # Create dummy cert files
402403 ca_pem_path = File . join ( tmpdir , 'ca.pem' )
403404 client_crt_path = File . join ( tmpdir , 'client.crt' )
@@ -419,13 +420,13 @@ def test_load_profile_tls_from_paths
419420
420421 profile = Temporalio ::EnvConfig ::ClientConfigProfile . load ( config_source : toml_config )
421422 refute_nil profile . tls
422- assert_equal 'custom-server' , profile . tls . server_name
423- refute_nil profile . tls . server_root_ca_cert
424- assert_equal ca_pem_path , profile . tls . server_root_ca_cert
425- refute_nil profile . tls . client_cert
426- assert_equal client_crt_path , profile . tls . client_cert
427- refute_nil profile . tls . client_private_key
428- assert_equal client_key_path , profile . tls . client_private_key
423+ assert_equal 'custom-server' , profile . tls . server_name # steep:ignore
424+ refute_nil profile . tls . server_root_ca_cert # steep:ignore
425+ assert_equal ca_pem_path , profile . tls . server_root_ca_cert # steep:ignore
426+ refute_nil profile . tls . client_cert # steep:ignore
427+ assert_equal client_crt_path , profile . tls . client_cert # steep:ignore
428+ refute_nil profile . tls . client_private_key # steep:ignore
429+ assert_equal client_key_path , profile . tls . client_private_key # steep:ignore
429430
430431 config = profile . to_client_connect_config
431432 tls_config = config [ :tls ]
@@ -895,7 +896,7 @@ def test_e2e_multi_profile_different_client_connections
895896 private
896897
897898 def with_temp_config_file ( content )
898- Dir . mktmpdir do |tmpdir |
899+ Dir . mktmpdir do |tmpdir | # steep:ignore
899900 config_file = File . join ( tmpdir , 'config.toml' )
900901 File . write ( config_file , content )
901902 yield config_file
0 commit comments