Skip to content

Commit

Permalink
chore: add test for blank spns in resolvehosttosid
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Sep 9, 2024
1 parent 8cd3b60 commit 8582781
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/unit/LDAPUtilsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,14 @@ public async Task Test_ResolveSearchResult_MSAGMSA() {
Assert.Equal("TESTLAB.LOCAL", result.Domain);
Assert.False(result.Deleted);
}

[Fact]
public async Task Test_ResolveHostToSid_BlankHost() {
var spn = "MSSQLSvc/:1433";
var utils = new LdapUtils();

var (success, sid) = await utils.ResolveHostToSid(spn, "");
Assert.False(success);
}
}
}

0 comments on commit 8582781

Please sign in to comment.