File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
tests/StackExchange.Redis.Tests Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ public class Roles : TestBase
1313 {
1414 public Roles ( ITestOutputHelper output , SharedConnectionFixture fixture ) : base ( output , fixture ) { }
1515
16- [ Fact ]
17- public void MasterRole ( )
16+ [ Theory ]
17+ [ InlineData ( true ) ]
18+ [ InlineData ( false ) ]
19+ public void MasterRole ( bool allowAdmin ) // should work with or without admin now
1820 {
19- using var muxer = Create ( allowAdmin : true ) ;
21+ using var muxer = Create ( allowAdmin : allowAdmin ) ;
2022 var server = muxer . GetServer ( TestConfig . Current . MasterServerAndPort ) ;
2123
2224 var role = server . Role ( ) ;
@@ -44,14 +46,5 @@ public void ReplicaRole()
4446 Assert . Equal ( replica . MasterIp , TestConfig . Current . MasterServer ) ;
4547 Assert . Equal ( replica . MasterPort , TestConfig . Current . MasterPort ) ;
4648 }
47-
48- [ Fact ]
49- public void RoleRequiresAdmin ( )
50- {
51- using var muxer = Create ( allowAdmin : false ) ;
52- var server = muxer . GetServer ( TestConfig . Current . MasterServerAndPort ) ;
53-
54- Assert . Throws < RedisCommandException > ( ( ) => server . Role ( ) ) ;
55- }
5649 }
5750}
You can’t perform that action at this time.
0 commit comments