Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove af_testing, update minitest #4

Merged
merged 1 commit into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# frozen_string_literal: true

source 'https://rubygems.org'

source 'https://rubygems.org' do
gem 'minitest', '>= 5.8', '< 6'
gem 'minitest', '>= 5.14', '< 6'
gem 'minitest-reporters', '>= 1.4', '< 2'
gem 'simplecov', '>= 0.18', '< 1', group: :test, require: false
gem 'simplecov', '>= 0.21', '< 1', group: :test, require: false
end

source 'https://rubygems.pkg.github.com/appfolio' do
gem 'af_gems', '>= 9.2', '< 10', group: :development
gem 'af_testing', '>= 14.4', '< 15'
end

gemspec
7 changes: 4 additions & 3 deletions gemfiles/ruby_2.6.3_rails60.gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# This file was generated by Appraisal

source "https://rubygems.org"

source "https://rubygems.org" do
gem "minitest", ">= 5.8", "< 6"
gem "minitest", ">= 5.14", "< 6"
gem "minitest-reporters", ">= 1.4", "< 2"
gem "simplecov", ">= 0.18", "< 1", group: :test, require: false
gem "simplecov", ">= 0.21", "< 1", group: :test, require: false
gem "rails", "~> 6.0.0"
end

source "https://rubygems.pkg.github.com/appfolio" do
gem "af_gems", ">= 9.2", "< 10", group: :development
gem "af_testing", ">= 14.4", "< 15"
end

gemspec path: "../"
7 changes: 4 additions & 3 deletions gemfiles/ruby_2.6.3_rails61.gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# This file was generated by Appraisal

source "https://rubygems.org"

source "https://rubygems.org" do
gem "minitest", ">= 5.8", "< 6"
gem "minitest", ">= 5.14", "< 6"
gem "minitest-reporters", ">= 1.4", "< 2"
gem "simplecov", ">= 0.18", "< 1", group: :test, require: false
gem "simplecov", ">= 0.21", "< 1", group: :test, require: false
gem "rails", "~> 6.1.0"
end

source "https://rubygems.pkg.github.com/appfolio" do
gem "af_gems", ">= 9.2", "< 10", group: :development
gem "af_testing", ">= 14.4", "< 15"
end

gemspec path: "../"
7 changes: 4 additions & 3 deletions gemfiles/ruby_2.7.1_rails60.gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# This file was generated by Appraisal

source "https://rubygems.org"

source "https://rubygems.org" do
gem "minitest", ">= 5.8", "< 6"
gem "minitest", ">= 5.14", "< 6"
gem "minitest-reporters", ">= 1.4", "< 2"
gem "simplecov", ">= 0.18", "< 1", group: :test, require: false
gem "simplecov", ">= 0.21", "< 1", group: :test, require: false
gem "rails", "~> 6.0.0"
end

source "https://rubygems.pkg.github.com/appfolio" do
gem "af_gems", ">= 9.2", "< 10", group: :development
gem "af_testing", ">= 14.4", "< 15"
end

gemspec path: "../"
7 changes: 4 additions & 3 deletions gemfiles/ruby_2.7.1_rails61.gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# This file was generated by Appraisal

source "https://rubygems.org"

source "https://rubygems.org" do
gem "minitest", ">= 5.8", "< 6"
gem "minitest", ">= 5.14", "< 6"
gem "minitest-reporters", ">= 1.4", "< 2"
gem "simplecov", ">= 0.18", "< 1", group: :test, require: false
gem "simplecov", ">= 0.21", "< 1", group: :test, require: false
gem "rails", "~> 6.1.0"
end

source "https://rubygems.pkg.github.com/appfolio" do
gem "af_gems", ">= 9.2", "< 10", group: :development
gem "af_testing", ">= 14.4", "< 15"
end

gemspec path: "../"
27 changes: 2 additions & 25 deletions test/dsig_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'base64'

class DsigTest < Minitest::Test
def _test_generate_key #very slow so not run by default
def test_generate_key #very slow so not run by default
signer=EzCrypto::Signer.generate
assert signer.rsa?
assert !signer.dsa?
Expand Down Expand Up @@ -243,7 +243,7 @@ def test_load_trusted_truststore
sf_root=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/sf-class2-root.crt"
assert trust.verify(sf_root)
starfield=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/sf_intermediate.crt"
assert trust.verify(starfield) if AfTesting.circle_ci?
assert trust.verify(starfield) if ENV.key?('CIRCLECI')
agree2=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/agree2.com.cert"
# DSS1 was dropped from OpenSSL in version 1.1
refute trust.verify(agree2)
Expand All @@ -255,29 +255,6 @@ def test_load_trusted_truststore
refute trust.verify(cert)
end

# Disabling these until pkyp is back up
# def test_public_key_load_from_pkyp
# verifier=EzCrypto::Verifier.from_pkyp "e93e18114cbefaaa89fda908b09df63d3662879a"
# agree2=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/agree2.com.cert"
# assert_equal agree2.cert.to_s,verifier.cert.to_s
# assert verifier
# end
#
# def test_register_public_key_at_pkyp
# pub=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/agree2.com.cert"
# assert_equal pub.digest,pub.register_with_pkyp
# end
#
# def test_create_register_and_fetch_public_key
# signer=EzCrypto::Signer.generate
# assert_equal signer.verifier.digest,signer.verifier.register_with_pkyp
# verifier=EzCrypto::Verifier.from_pkyp signer.verifier.digest
# sig=signer.sign "hello"
# assert sig
# assert verifier.verify( sig,"hello")
# end
#

def assert_signer(signer)
assert signer
assert signer.public_key
Expand Down
3 changes: 1 addition & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
end
end

require 'af_testing/mini_test'
require 'minitest/autorun'
require 'minitest/reporters'

MiniTest::Reporters.use!
MiniTest::Reporters.use! unless ENV['RM_INFO']