|
11 | 11 |
|
12 | 12 | -compile(export_all).
|
13 | 13 |
|
14 |
| -all() -> [encrypt_decrypt, |
15 |
| - encrypt_decrypt_char_list_value, |
16 |
| - encrypt_decrypt_invalid_char_list_value, |
17 |
| - use_predefined_secret, |
18 |
| - use_cookie_as_secret, |
19 |
| - change_of_secret_returns_passed_in_data, |
20 |
| - fallback_secret, |
21 |
| - encryption_happens_only_when_secret_available, |
22 |
| - change_default_cipher, |
23 |
| - disabled, |
24 |
| - refresh_configuration, |
25 |
| - refresh_configuration_invalid_cipher, |
26 |
| - application_failure_for_invalid_cipher]. |
| 14 | +all() -> |
| 15 | + AllTests = [encrypt_decrypt, |
| 16 | + encrypt_decrypt_char_list_value, |
| 17 | + encrypt_decrypt_invalid_char_list_value, |
| 18 | + use_predefined_secret, |
| 19 | + use_cookie_as_secret, |
| 20 | + change_of_secret_returns_passed_in_data, |
| 21 | + fallback_secret, |
| 22 | + encryption_happens_only_when_secret_available, |
| 23 | + change_default_cipher, |
| 24 | + disabled, |
| 25 | + refresh_configuration, |
| 26 | + refresh_configuration_invalid_cipher, |
| 27 | + application_failure_for_invalid_cipher], |
| 28 | + case {os:getenv("GITHUB_ACTIONS"), os:type()} of |
| 29 | + {false, _} -> |
| 30 | + AllTests; |
| 31 | + {_, {win32, _}} -> |
| 32 | + ct:pal("skipping some tests on GitHub actions on Windows"), |
| 33 | + Tests0 = lists:delete(use_cookie_as_secret, AllTests), |
| 34 | + Tests1 = lists:delete(encryption_happens_only_when_secret_available, Tests0), |
| 35 | + Tests1 |
| 36 | + end. |
27 | 37 |
|
28 | 38 | init_per_testcase(disabled, Config) ->
|
29 | 39 | ok = application:set_env(credentials_obfuscation, enabled, false),
|
@@ -122,8 +132,7 @@ use_cookie_as_secret(_Config) ->
|
122 | 132 | CookieBin = atom_to_binary(Cookie, utf8),
|
123 | 133 | ok = credentials_obfuscation:set_secret(CookieBin),
|
124 | 134 | ?assertEqual(CookieBin, credentials_obfuscation:secret()),
|
125 |
| - ok = net_kernel:stop(), |
126 |
| - ok. |
| 135 | + ok = net_kernel:stop(). |
127 | 136 |
|
128 | 137 | %% change of secret should not crash the credentials_obfuscation_svc process
|
129 | 138 | change_of_secret_returns_passed_in_data(_Config) ->
|
@@ -190,8 +199,7 @@ encryption_happens_only_when_secret_available(_Config) ->
|
190 | 199 | {encrypted, _} = EncryptedUri,
|
191 | 200 | ?assertEqual(Uri, credentials_obfuscation:decrypt(EncryptedUri)),
|
192 | 201 |
|
193 |
| - ok = net_kernel:stop(), |
194 |
| - ok. |
| 202 | + ok = net_kernel:stop(). |
195 | 203 |
|
196 | 204 | change_default_cipher(_Config) ->
|
197 | 205 | ?assertNotEqual(credentials_obfuscation_pbe:default_cipher(), credentials_obfuscation:cipher()),
|
|
0 commit comments