44from .instance import DflyStartException
55
66
7+ @pytest .mark .tls
78async def test_tls_no_auth (df_factory , with_tls_server_args ):
89 # Needs some authentication
910 server = df_factory .create (** with_tls_server_args )
1011 with pytest .raises (DflyStartException ):
1112 server .start ()
1213
1314
15+ @pytest .mark .tls
1416async def test_tls_no_key (df_factory ):
1517 # Needs a private key and certificate.
1618 server = df_factory .create (tls = None , requirepass = "XXX" )
1719 with pytest .raises (DflyStartException ):
1820 server .start ()
1921
2022
23+ @pytest .mark .tls
2124async def test_tls_password (df_factory , with_tls_server_args , with_tls_ca_cert_args ):
2225 with df_factory .create (requirepass = "XXX" , ** with_tls_server_args ) as server :
2326 async with server .client (
@@ -26,6 +29,7 @@ async def test_tls_password(df_factory, with_tls_server_args, with_tls_ca_cert_a
2629 await client .ping ()
2730
2831
32+ @pytest .mark .tls
2933async def test_tls_client_certs (
3034 df_factory , with_ca_tls_server_args , with_tls_client_args , with_tls_ca_cert_args
3135):
@@ -36,24 +40,28 @@ async def test_tls_client_certs(
3640 await client .ping ()
3741
3842
43+ @pytest .mark .tls
3944async def test_client_tls_no_auth (df_factory ):
4045 server = df_factory .create (tls_replication = None )
4146 with pytest .raises (DflyStartException ):
4247 server .start ()
4348
4449
50+ @pytest .mark .tls
4551async def test_client_tls_password (df_factory ):
4652 with df_factory .create (tls_replication = None , masterauth = "XXX" ):
4753 pass
4854
4955
56+ @pytest .mark .tls
5057async def test_client_tls_cert (df_factory , with_tls_server_args ):
5158 key_args = with_tls_server_args .copy ()
5259 key_args .pop ("tls" )
5360 with df_factory .create (tls_replication = None , ** key_args ):
5461 pass
5562
5663
64+ @pytest .mark .tls
5765async def test_config_enable_tls_with_ca_dir (
5866 df_factory , with_ca_dir_tls_server_args , with_tls_client_args
5967):
@@ -67,6 +75,7 @@ async def test_config_enable_tls_with_ca_dir(
6775 assert res == "44"
6876
6977
78+ @pytest .mark .tls
7079async def test_config_update_tls_certs (
7180 df_factory , with_tls_server_args , with_tls_ca_cert_args , tmp_dir
7281):
@@ -112,6 +121,7 @@ async def test_config_update_tls_certs(
112121 await client .ping ()
113122
114123
124+ @pytest .mark .tls
115125async def test_config_enable_tls (
116126 df_factory , with_ca_tls_server_args , with_tls_client_args , with_tls_ca_cert_args
117127):
@@ -152,6 +162,7 @@ async def test_config_enable_tls(
152162 await client_tls .ping ()
153163
154164
165+ @pytest .mark .tls
155166async def test_config_disable_tls (
156167 df_factory , with_ca_tls_server_args , with_tls_client_args , with_tls_ca_cert_args
157168):
0 commit comments