Skip to content

Commit

Permalink
[test] cleanup - no longer tested on Java 7
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Feb 13, 2024
1 parent 06f3e29 commit 1b728a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
7 changes: 1 addition & 6 deletions src/test/ruby/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def assert_not_same(expected, actual)
end
end

def self.disable_security_restrictions!; @@security_restrictions = nil end # do nothing on MRI
def self.disable_security_restrictions!; end # do nothing on MRI

@@security_restrictions = ''

Expand All @@ -121,11 +121,6 @@ def self.disable_security_restrictions
disable_security_restrictions! if @@security_restrictions.eql?('')
end

def self.security_restrictions?
disable_security_restrictions; return @@security_restrictions
end

def self.java7?; java_version.last.to_i == 7 end
def self.java8?; java_version.last.to_i == 8 end

def self.java_version
Expand Down
9 changes: 4 additions & 5 deletions src/test/ruby/x509/test_x509cert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,10 @@ def test_resolve_extensions
assert_equal 5, cert.extensions.size

# Java 6/7 seems to maintain same order but Java 8 does definitely not :
# TODO there must be something going on under - maybe not BC parsing ?!?
if self.class.java7?
assert_equal '97:39:9D:C3:FB:CD:BA:8F:54:0C:90:7B:46:3F:EA:D6:43:75:B1:CB', cert.extensions[2].value
assert_equal 'email:[email protected], DNS:jruby.org', cert.extensions[4].value
end
#if self.class.java_version.last.to_i == 7
# assert_equal '97:39:9D:C3:FB:CD:BA:8F:54:0C:90:7B:46:3F:EA:D6:43:75:B1:CB', cert.extensions[2].value
# assert_equal 'email:[email protected], DNS:jruby.org', cert.extensions[4].value
#end

exts = cert.extensions.dup

Expand Down

0 comments on commit 1b728a9

Please sign in to comment.