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

Unit tests fail when run in Buildkite #8771

Open
tas50 opened this issue Jul 24, 2019 · 2 comments

Comments

@tas50
Copy link
Member

commented Jul 24, 2019

When running our unit tests in BuildKite instead of AppVeyor they fail:

Failures:

  1) Chef::Mixin::OpenSSLHelper#gen_x509_cert When given valid parameters to generate a self signed certificate Generates a valid x509 Certificate
     Failure/Error: @x509_certificate = @instance.gen_x509_cert(@rsa_request, @x509_extension, @info_without_issuer, @rsa_key)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:285:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:285:in `gen_x509_cert'
     # ./spec/unit/mixin/openssl_helper_spec.rb:531:in `block (4 levels) in <top (required)>'

  2) Chef::Mixin::OpenSSLHelper#gen_x509_cert When given valid parameters to generate a CA signed certificate Generates a valid x509 Certificate
     Failure/Error: @x509_certificate = @instance.gen_x509_cert(@ec_request, @x509_extension, @info_with_issuer, @ca_key)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:285:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:285:in `gen_x509_cert'
     # ./spec/unit/mixin/openssl_helper_spec.rb:539:in `block (4 levels) in <top (required)>'

  3) Chef::Mixin::OpenSSLHelper#gen_x509_crl When given valid parameters to generate a CRL Generates a valid x509 CRL
     Failure/Error: @x509_crl = instance.gen_x509_crl(@ca_key, @info)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
     # ./spec/unit/mixin/openssl_helper_spec.rb:660:in `block (4 levels) in <top (required)>'

  4) Chef::Mixin::OpenSSLHelper#renew_x509_crl When the CRL given is anything other then a Ruby OpenSSL::X509::CRL object Raises a TypeError
     Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
     # ./spec/unit/mixin/openssl_helper_spec.rb:691:in `block (3 levels) in <top (required)>'

  5) Chef::Mixin::OpenSSLHelper#renew_x509_crl When the CA private key given is anything other then a Ruby OpenSSL::PKey::EC object or a OpenSSL::PKey::RSA object Raises a TypeError
     Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
     # ./spec/unit/mixin/openssl_helper_spec.rb:691:in `block (3 levels) in <top (required)>'

  6) Chef::Mixin::OpenSSLHelper#renew_x509_crl When the info given is anything other then a Ruby Hash Raises a TypeError
     Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
     # ./spec/unit/mixin/openssl_helper_spec.rb:691:in `block (3 levels) in <top (required)>'

  7) Chef::Mixin::OpenSSLHelper#renew_x509_crl When a misformatted info Ruby Hash is given Raises a ArgumentError
     Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
     # ./spec/unit/mixin/openssl_helper_spec.rb:691:in `block (3 levels) in <top (required)>'

  8) Chef::Mixin::OpenSSLHelper#renew_x509_crl When a misformatted info Ruby Hash is given Raises a TypeError
     Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
     # ./spec/unit/mixin/openssl_helper_spec.rb:691:in `block (3 levels) in <top (required)>'

  9) Chef::Mixin::OpenSSLHelper#renew_x509_crl When a misformatted info Ruby Hash is given Raises a TypeError
     Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
     # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
     # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
     # ./spec/unit/mixin/openssl_helper_spec.rb:691:in `block (3 levels) in <top (required)>'

  10) Chef::Mixin::OpenSSLHelper#renew_x509_crl When given valid parameters to renew a CRL Renew a valid x509 CRL
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:691:in `block (3 levels) in <top (required)>'

  11) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When the revoke_info given is anything other then a Ruby Hash Raises a TypeError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  12) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When the CRL given is anything other then a Ruby OpenSSL::X509::CRL object Raises a TypeError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  13) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When the CA private key given is anything other then a Ruby OpenSSL::PKey::EC object or a OpenSSL::PKey::RSA object Raises a TypeError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  14) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When the info given is anything other then a Ruby Hash Raises a TypeError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  15) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When a misformatted revoke_info Ruby Hash is given Raises a ArgumentError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  16) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When a misformatted revoke_info Ruby Hash is given Raises a TypeError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  17) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When a misformatted revoke_info Ruby Hash is given Raises a TypeError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  18) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When a misformatted info Ruby Hash is given Raises a ArgumentError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  19) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When a misformatted info Ruby Hash is given Raises a TypeError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  20) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When a misformatted info Ruby Hash is given Raises a TypeError
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  21) Chef::Mixin::OpenSSLHelper#revoke_x509_crl When given valid parameters to revoke a Serial in a CRL Revoke a Serial in a CRL
      Failure/Error: @crl = @instance.gen_x509_crl(@ca_key, @info)

      Errno::ENOENT:
        No such file or directory @ rb_sysopen - C:/ruby26/ssl/openssl.cnf
      # ./lib/chef/mixin/openssl_helper.rb:316:in `new'
      # ./lib/chef/mixin/openssl_helper.rb:316:in `gen_x509_crl'
      # ./spec/unit/mixin/openssl_helper_spec.rb:772:in `block (3 levels) in <top (required)>'

  22) Chef::Resource::File::Verification#verify with a verification command(String) returns true if the command succeeds
      Failure/Error: expect(v.verify(temp_path)).to eq(true)

        expected: true
             got: false

        (compared using ==)

        Diff:
        @@ -1,2 +1,2 @@
        -true
        +false
      # ./spec/unit/resource/file/verification_spec.rb:116:in `block (4 levels) in <top (required)>'
@lamont-granquist

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

For the last one it looks like we expect to be able to run the commands "true" and "false" on windows boxes -- really shelling out to those. Those shell_out commands could be mocked.

@lamont-granquist

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

For all the first ones, this is failing:

        ef.config = ::OpenSSL::Config.load(::OpenSSL::Config::DEFAULT_CONFIG_FILE)

and that smells like the OpenSSL config in the ruby 2.6 that buildkite ships is busted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.