File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
Original file line number Diff line number Diff line change 7
7
- TESTENV=openldap
8
8
- TESTENV=apacheds
9
9
10
+ # https://docs.travis-ci.com/user/hosts/
11
+ addons :
12
+ hosts :
13
+ - ad1.ghe.dev
14
+ - ad2.ghe.dev
15
+
10
16
install :
11
17
- if [ "$TESTENV" = "openldap" ]; then ./script/install-openldap; fi
12
18
- bundle install
Original file line number Diff line number Diff line change 2
2
3
3
class GitHubLdapConnectionCacheTestCases < GitHub ::Ldap ::Test
4
4
5
- def options
6
- {
7
- admin_user : "uid=admin,dc=github,dc=com" ,
8
- admin_password : "passworD1" ,
9
- port : 389
10
- }
11
- end
12
-
13
5
def test_returns_cached_connection
14
- conn1 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ghe.gh " ) )
15
- conn2 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ghe.gh " ) )
6
+ conn1 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ad1. ghe.dev " ) )
7
+ conn2 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ad1. ghe.dev " ) )
16
8
assert_equal conn1 . object_id , conn2 . object_id
17
9
end
18
10
19
11
def test_creates_new_connections_per_host
20
- conn1 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ghe.gh " ) )
21
- conn2 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ghe.dev" ) )
22
- conn3 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ghe.dev" ) )
12
+ conn1 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ad1. ghe.dev " ) )
13
+ conn2 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ad2. ghe.dev" ) )
14
+ conn3 = GitHub ::Ldap ::ConnectionCache . get_connection ( options . merge ( :host => "ad2. ghe.dev" ) )
23
15
refute_equal conn1 . object_id , conn2 . object_id
24
16
assert_equal conn2 . object_id , conn3 . object_id
25
17
end
You can’t perform that action at this time.
0 commit comments