Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Running tests with USE_LDAP enabled outside of Yale breaks things #1411

Closed
@orenyk

Description

@orenyk

While waiting for my car to get serviced and trying to get work done, I encountered a bunch of failed tests due to LDAP lookup timeouts as I had USE_LDAP set from a different issue (#1375). I'll verify that everything passes when LDAP is disabled, but we should probably enforce ENV['USE_LDAP'] = nil for the test environment. If we really wanted to do things right, we'd also go through and either remove all tests that are directly related to LDAP and/or stub LDAP queries somehow.

Here are the tests that failed before I killed Rspec (was taking forever):

  • spec/controllers/users_controller_spec.rb:59
  • spec/controllers/import_users_controller.rb (a bunch)

Let's do it right:

  • ensure USE_LDAP defaults to nil in test
  • properly stub LDAP queries and run them in isolated blocks with ENV modified
  • go through all LDAP-related specs and make sure they're actually worth testing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions