Procházet zdrojové kódy

test: fix mongodb tls suite

dryruns return error when local health check fails
Zaiming (Stone) Shi před 4 roky
rodič
revize
f866488bc2

+ 4 - 4
apps/emqx_authn/test/emqx_authn_mongo_tls_SUITE.erl

@@ -91,7 +91,7 @@ t_create_invalid_server_name(_Config) ->
        create_mongo_auth_with_ssl_opts(
        create_mongo_auth_with_ssl_opts(
          #{<<"server_name_indication">> => <<"authn-server-unknown-host">>,
          #{<<"server_name_indication">> => <<"authn-server-unknown-host">>,
            <<"verify">> => <<"verify_peer">>}),
            <<"verify">> => <<"verify_peer">>}),
-       fun({ok, _}, Trace) ->
+       fun({error, _}, Trace) ->
                ?assertEqual(
                ?assertEqual(
                   [failed],
                   [failed],
                   ?projection(
                   ?projection(
@@ -109,7 +109,7 @@ t_create_invalid_version(_Config) ->
          #{<<"server_name_indication">> => <<"authn-server">>,
          #{<<"server_name_indication">> => <<"authn-server">>,
            <<"verify">> => <<"verify_peer">>,
            <<"verify">> => <<"verify_peer">>,
            <<"versions">> => [<<"tlsv1.1">>]}),
            <<"versions">> => [<<"tlsv1.1">>]}),
-       fun({ok, _}, Trace) ->
+       fun({error, _}, Trace) ->
                ?assertEqual(
                ?assertEqual(
                   [failed],
                   [failed],
                   ?projection(
                   ?projection(
@@ -118,7 +118,7 @@ t_create_invalid_version(_Config) ->
        end).
        end).
 
 
 
 
-%% docker-compose-mongo-single-tls.yaml: 
+%% docker-compose-mongo-single-tls.yaml:
 %% --setParameter opensslCipherConfig='HIGH:!EXPORT:!aNULL:!DHE:!kDHE@STRENGTH'
 %% --setParameter opensslCipherConfig='HIGH:!EXPORT:!aNULL:!DHE:!kDHE@STRENGTH'
 
 
 t_invalid_ciphers(_Config) ->
 t_invalid_ciphers(_Config) ->
@@ -128,7 +128,7 @@ t_invalid_ciphers(_Config) ->
            <<"verify">> => <<"verify_peer">>,
            <<"verify">> => <<"verify_peer">>,
            <<"versions">> => [<<"tlsv1.2">>],
            <<"versions">> => [<<"tlsv1.2">>],
            <<"ciphers">> => [<<"DHE-RSA-AES256-GCM-SHA384">>]}),
            <<"ciphers">> => [<<"DHE-RSA-AES256-GCM-SHA384">>]}),
-       fun({ok, _}, Trace) ->
+       fun({error, _}, Trace) ->
                ?assertEqual(
                ?assertEqual(
                   [failed],
                   [failed],
                   ?projection(
                   ?projection(