Merge pull request #47 from rahaskhora/users/rakhora/aliasmatchissue

updated alias matching logic and updated the failing functional tests
This commit is contained in:
deepakparameshms 2022-05-24 16:58:32 +05:30 коммит произвёл GitHub
Родитель 85f48010ca ada8ae786b
Коммит 67c9abc1d7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -72,7 +72,7 @@ namespace Microsoft.FeatureFlighting.Infrastructure.Graph
foreach (string securityGroup in securityGroupIds)
{
IList<string> groupMembers = await GetGroupMembers(securityGroup, trackingIds);
if (groupMembers.Any(member => member.ToLowerInvariant().StartsWith(userAlias)))
if (groupMembers.Any(member => member.Split('@')[0].ToLowerInvariant().Equals(userAlias)))
{
return true;
}

Просмотреть файл

@ -348,7 +348,7 @@ namespace Microsoft.FeatureFlighting.Tests.Functional.Functional_Test
//Act
var result = await flightingClient.Evaluate(app, environment, featureNameList, context.ToString());
//Assert
Assert.IsTrue(result[featureName]);
Assert.IsFalse(result[featureName]);
}
[TestCategory("Functional")]
@ -420,7 +420,7 @@ namespace Microsoft.FeatureFlighting.Tests.Functional.Functional_Test
var result = await flightingClient.Evaluate(app, environment, featureNameList, context.ToString());
//Assert
Assert.IsFalse(result[featureName]);
Assert.IsTrue(result[featureName]);
}
[TestCategory("Functional")]
@ -539,7 +539,7 @@ namespace Microsoft.FeatureFlighting.Tests.Functional.Functional_Test
var result = await flightingClient.Evaluate(app, environment, featureNameList, context);
//Assert
Assert.IsTrue(result[featureName]);
Assert.IsFalse(result[featureName]);
}
[TestCategory("Functional")]
@ -563,7 +563,7 @@ namespace Microsoft.FeatureFlighting.Tests.Functional.Functional_Test
var result = await flightingClient.Evaluate(app, environment, featureNameList, context);
//Assert
Assert.IsFalse(result[featureName]);
Assert.IsTrue(result[featureName]);
}
}