Skip to content

Commit 8612fb8

Browse files
committed
role no longer requires admin
1 parent 88e9e36 commit 8612fb8

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

tests/StackExchange.Redis.Tests/Roles.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)