File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,18 @@ def self.stop_server
29
29
end
30
30
end
31
31
32
+ def self . test_server_options
33
+ {
34
+ custom_schemas : FIXTURES . join ( 'posixGroup.schema.ldif' ) . to_s ,
35
+ user_fixtures : FIXTURES . join ( 'common/seed.ldif' ) . to_s ,
36
+ allow_anonymous : true ,
37
+ verbose : ENV . fetch ( "VERBOSE" , "0" ) == "1"
38
+ }
39
+ end
40
+
32
41
def self . start_server
33
42
if test_env == "apacheds"
34
- server_opts = respond_to? ( :test_server_options ) ? test_server_options : { }
35
- GitHub ::Ldap . start_server ( server_opts )
43
+ GitHub ::Ldap . start_server ( test_server_options )
36
44
end
37
45
end
38
46
@@ -42,6 +50,8 @@ def options
42
50
case self . class . test_env
43
51
when "apacheds"
44
52
GitHub ::Ldap . server_options . merge \
53
+ admin_user : 'uid=admin,dc=github,dc=com' ,
54
+ admin_password : 'passworD1' ,
45
55
host : 'localhost' ,
46
56
uid : 'uid' ,
47
57
instrumentation_service : @service
@@ -60,12 +70,6 @@ def options
60
70
end
61
71
62
72
class GitHub ::Ldap ::UnauthenticatedTest < GitHub ::Ldap ::Test
63
- def self . start_server
64
- if test_env == "apacheds"
65
- GitHub ::Ldap . start_server ( :allow_anonymous => true )
66
- end
67
- end
68
-
69
73
def options
70
74
@options ||= begin
71
75
super . delete_if { |k , _ | [ :admin_user , :admin_password ] . include? ( k ) }
You can’t perform that action at this time.
0 commit comments