-
Notifications
You must be signed in to change notification settings - Fork 27
Local ActiveDirectory integration testing #61
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2aa8c10
document local AD integration testing
8ef4551
add activedirectory test options
cf0d907
add AD validator integration tests
a316402
Minor tweaks and corrections
mtodd ec9021e
Use INTEGRATION_* instead of flavor-specific ENV vars
mtodd f95f985
Merge branch 'master' into local-activedirectory-integration-testing
mtodd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
env.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Local ActiveDirectory Integration Testing | ||
|
||
Integration tests are not run for ActiveDirectory in continuous integration | ||
because we cannot install a Windows VM on TravisCI. To test ActiveDirectory, | ||
configure a local VM with AD running (this is left as an exercise for the | ||
reader). | ||
|
||
To run integration tests against the local ActiveDirectory VM, from the project | ||
root run: | ||
|
||
``` bash | ||
# duplicate example env.sh for specific config | ||
$ cp test/support/vm/activedirectory/env.sh{.example,} | ||
|
||
# edit env.sh and fill in with your VM's values, then | ||
$ source test/support/vm/activedirectory/env.sh | ||
|
||
# run all tests against AD | ||
$ time bundle exec rake | ||
|
||
# run a specific test file against AD | ||
$ time bundle exec ruby test/membership_validators/active_directory_test.rb | ||
|
||
# reset environment to test other LDAP servers | ||
$ source test/support/vm/activedirectory/reset-env.sh | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copy this to ad-env.sh, and fill in with your own values | ||
|
||
export TESTENV=activedirectory | ||
export INTEGRATION_HOST=123.123.123.123 | ||
export INTEGRATION_PORT=389 | ||
export INTEGRATION_USER="CN=Administrator,CN=Users,DC=ad,DC=example,DC=com" | ||
export INTEGRATION_PASSWORD='passworD1' | ||
export INTEGRATION_SEARCH_DOMAINS='CN=Users,DC=example,DC=com' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
unset TESTENV | ||
unset INTEGRATION_HOST | ||
unset INTEGRATION_PORT | ||
unset INTEGRATION_USER | ||
unset INTEGRATION_PASSWORD | ||
unset INTEGRATION_SEARCH_DOMAINS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might be able to make this generic using
INTEGRATION_HOST
et al.