Sha256: 6fc3cc1ced63e4e2d5e819e7ef80700a744921325041bfd154ae7afc75bdd7b2

Contents?: true

Size: 953 Bytes

Versions: 34

Compression:

Stored size: 953 Bytes

Contents

describe Appsignal::Extension, :extension_installation_failure do
  context "when the extension library cannot be loaded" do
    # This test breaks the installation on purpose and is not run by default.
    # See `rake test:failure`. If this test was run, run `rake
    # extension:install` again to fix the extension installation.
    it "prints and logs an error" do
      # ENV var to make sure installation fails on purpurse
      ENV["_TEST_APPSIGNAL_EXTENSION_FAILURE"] = "true"
      `rake extension:install` # Run installation

      require "open3"
      _stdout, stderr, _status = Open3.capture3("bin/appsignal --version")
      expect(stderr).to include("ERROR: AppSignal failed to load extension")
      error_message =
        if DependencyHelper.running_jruby?
          "cannot open shared object file"
        else
          "LoadError: cannot load such file"
        end
      expect(stderr).to include(error_message)
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
appsignal-3.0.2-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.2 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.1-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.1 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.0-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.0 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.0.rc.1 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.0.rc.1-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.9-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.9 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.8-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.8 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.7 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.7-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.6 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.6-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.0.beta.1 spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-3.0.0.beta.1-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.5-java spec/lib/appsignal/extension_install_failure_spec.rb
appsignal-2.11.5 spec/lib/appsignal/extension_install_failure_spec.rb