diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2020-04-22 21:46:39 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2020-05-13 16:01:04 +0900 |
commit | 259e6fd2dcdf624627f95071460fdc17b98d4a39 (patch) | |
tree | 47dc360f7c5d87fb1970a1db6a7e15c053d0a59e | |
parent | 9ce2ccf36d6bb06e4031d8773522d96ca0ed7971 (diff) | |
download | ruby-openssl-259e6fd2dcdf624627f95071460fdc17b98d4a39.tar.gz |
test/openssl/test_config: fix non-deterministic test case
Sort keys of a section before comparing. The ordering is not part of the
API. This can cause a test failure if we use OpenSSL's C implementation.
Fixes: 2ad65b5f673f ("config: support .include directive", 2018-08-16)
-rw-r--r-- | test/openssl/test_config.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/openssl/test_config.rb b/test/openssl/test_config.rb index 9a3a6a80..a725add2 100644 --- a/test/openssl/test_config.rb +++ b/test/openssl/test_config.rb @@ -151,7 +151,7 @@ __EOC__ # Include a file by relative path c1 = OpenSSL::Config.parse(include_file) assert_equal(["default", "sec-a", "sec-b", "sec-main"], c1.sections.sort) - assert_equal(["file-main", "file-a", "file-b"], c1["default"].keys) + assert_equal(["file-a", "file-b", "file-main"], c1["default"].keys.sort) assert_equal({"a" => "123"}, c1["sec-a"]) assert_equal({"b" => "123"}, c1["sec-b"]) assert_equal({"main" => "123", "key_outside_section" => "value_a"}, c1["sec-main"]) |