-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust model and tests to config v6 schema changes
- Loading branch information
Showing
12 changed files
with
54 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ public void SettingValue_ToString(object? value, string expectedResult) | |
} | ||
|
||
[DataTestMethod] | ||
[DataRow(BasicSampleSdkKey, null, "stringIsNotInDogDefaultCat", 0, 0, new[] { "User.Email IS NOT ONE OF [<2 hashed values>]" })] | ||
[DataRow(BasicSampleSdkKey, null, "stringIsNotInDogDefaultCat", 0, 0, new[] { "User.Email IS NOT ONE OF ['[email protected]', '[email protected]']" })] | ||
[DataRow(SegmentsV6SampleSdkKey, null, "countrySegment", 0, 0, new[] { "User IS IN SEGMENT 'United'" })] | ||
[DataRow(FlagDependencyV6SampleSdkKey, null, "boolDependsOnBool", 0, 0, new[] { "Flag 'mainBoolFlag' EQUALS 'True'" })] | ||
public void Condition_ToString(string? sdkKey, string baseUrlOrFileName, string settingKey, int targetingRuleIndex, int conditionIndex, string[] expectedResultLines) | ||
|
@@ -71,7 +71,7 @@ public void PercentageOption_ToString(string? sdkKey, string baseUrlOrFileName, | |
[DataTestMethod] | ||
[DataRow(BasicSampleSdkKey, null, "stringIsNotInDogDefaultCat", 0, new[] | ||
{ | ||
"IF User.Email IS NOT ONE OF [<2 hashed values>]", | ||
"IF User.Email IS NOT ONE OF ['[email protected]', '[email protected]']", | ||
"THEN 'Dog'", | ||
})] | ||
[DataRow(ComparatorsV6SampleSdkKey, null, "missingPercentageAttribute", 0, new[] | ||
|
@@ -102,7 +102,7 @@ public void TargetingRule_ToString(string? sdkKey, string baseUrlOrFileName, str | |
[DataRow(null, "test_json_complex", "doubleSetting", new[] { "To all users: '3.14'" })] | ||
[DataRow(BasicSampleSdkKey, null, "stringIsNotInDogDefaultCat", new[] | ||
{ | ||
"IF User.Email IS NOT ONE OF [<2 hashed values>]", | ||
"IF User.Email IS NOT ONE OF ['[email protected]', '[email protected]']", | ||
"THEN 'Dog'", | ||
"To all others: 'Cat'", | ||
})] | ||
|
@@ -122,7 +122,7 @@ public void TargetingRule_ToString(string? sdkKey, string baseUrlOrFileName, str | |
})] | ||
[DataRow(BasicSampleSdkKey, null, "string25Cat25Dog25Falcon25HorseAdvancedRules", new[] | ||
{ | ||
"IF User.Country IS ONE OF [<2 hashed values>]", | ||
"IF User.Country IS ONE OF ['Hungary', 'United Kingdom']", | ||
"THEN 'Dolphin'", | ||
"ELSE IF User.Custom1 CONTAINS ANY OF ['admi']", | ||
"THEN 'Lion'", | ||
|
6 changes: 3 additions & 3 deletions
6
...Client.Tests/data/evaluationlog/2_targeting_rules/2_rules_matching_targeted_attribute.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
WARNING [3003] Cannot evaluate condition (User.Email IS ONE OF [<2 hashed values>]) for setting 'stringIsInDogDefaultCat' (the User.Email attribute is missing). You should set the User.Email attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
WARNING [3003] Cannot evaluate condition (User.Email IS ONE OF ['[email protected]', '[email protected]']) for setting 'stringIsInDogDefaultCat' (the User.Email attribute is missing). You should set the User.Email attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
INFO [5000] Evaluating 'stringIsInDogDefaultCat' for User '{"Identifier":"12345","Custom1":"admin"}' | ||
Evaluating targeting rules and applying the first match if any: | ||
- IF User.Email IS ONE OF [<2 hashed values>] THEN 'Dog' => cannot evaluate, the User.Email attribute is missing | ||
- IF User.Email IS ONE OF ['[email protected]', '[email protected]'] THEN 'Dog' => cannot evaluate, the User.Email attribute is missing | ||
The current targeting rule is ignored and the evaluation continues with the next rule. | ||
- IF User.Custom1 IS ONE OF [<1 hashed value>] THEN 'Dog' => MATCH, applying rule | ||
- IF User.Custom1 IS ONE OF ['admin'] THEN 'Dog' => MATCH, applying rule | ||
Returning 'Dog'. |
8 changes: 4 additions & 4 deletions
8
...igCat.Client.Tests/data/evaluationlog/2_targeting_rules/2_rules_no_targeted_attribute.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
WARNING [3003] Cannot evaluate condition (User.Email IS ONE OF [<2 hashed values>]) for setting 'stringIsInDogDefaultCat' (the User.Email attribute is missing). You should set the User.Email attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
WARNING [3003] Cannot evaluate condition (User.Custom1 IS ONE OF [<1 hashed value>]) for setting 'stringIsInDogDefaultCat' (the User.Custom1 attribute is missing). You should set the User.Custom1 attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
WARNING [3003] Cannot evaluate condition (User.Email IS ONE OF ['[email protected]', '[email protected]']) for setting 'stringIsInDogDefaultCat' (the User.Email attribute is missing). You should set the User.Email attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
WARNING [3003] Cannot evaluate condition (User.Custom1 IS ONE OF ['admin']) for setting 'stringIsInDogDefaultCat' (the User.Custom1 attribute is missing). You should set the User.Custom1 attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
INFO [5000] Evaluating 'stringIsInDogDefaultCat' for User '{"Identifier":"12345"}' | ||
Evaluating targeting rules and applying the first match if any: | ||
- IF User.Email IS ONE OF [<2 hashed values>] THEN 'Dog' => cannot evaluate, the User.Email attribute is missing | ||
- IF User.Email IS ONE OF ['[email protected]', '[email protected]'] THEN 'Dog' => cannot evaluate, the User.Email attribute is missing | ||
The current targeting rule is ignored and the evaluation continues with the next rule. | ||
- IF User.Custom1 IS ONE OF [<1 hashed value>] THEN 'Dog' => cannot evaluate, the User.Custom1 attribute is missing | ||
- IF User.Custom1 IS ONE OF ['admin'] THEN 'Dog' => cannot evaluate, the User.Custom1 attribute is missing | ||
The current targeting rule is ignored and the evaluation continues with the next rule. | ||
Returning 'Cat'. |
4 changes: 2 additions & 2 deletions
4
src/ConfigCat.Client.Tests/data/evaluationlog/2_targeting_rules/2_rules_no_user.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
WARNING [3001] Cannot evaluate targeting rules and % options for setting 'stringIsInDogDefaultCat' (User Object is missing). You should pass a User Object to the evaluation methods like `GetValue()`/`GetValueAsync()` in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
INFO [5000] Evaluating 'stringIsInDogDefaultCat' | ||
Evaluating targeting rules and applying the first match if any: | ||
- IF User.Email IS ONE OF [<2 hashed values>] THEN 'Dog' => cannot evaluate, User Object is missing | ||
- IF User.Email IS ONE OF ['[email protected]', '[email protected]'] THEN 'Dog' => cannot evaluate, User Object is missing | ||
The current targeting rule is ignored and the evaluation continues with the next rule. | ||
- IF User.Custom1 IS ONE OF [<1 hashed value>] THEN 'Dog' => cannot evaluate, User Object is missing | ||
- IF User.Custom1 IS ONE OF ['admin'] THEN 'Dog' => cannot evaluate, User Object is missing | ||
The current targeting rule is ignored and the evaluation continues with the next rule. | ||
Returning 'Cat'. |
6 changes: 3 additions & 3 deletions
6
...nt.Tests/data/evaluationlog/2_targeting_rules/2_rules_not_matching_targeted_attribute.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
WARNING [3003] Cannot evaluate condition (User.Email IS ONE OF [<2 hashed values>]) for setting 'stringIsInDogDefaultCat' (the User.Email attribute is missing). You should set the User.Email attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
WARNING [3003] Cannot evaluate condition (User.Email IS ONE OF ['[email protected]', '[email protected]']) for setting 'stringIsInDogDefaultCat' (the User.Email attribute is missing). You should set the User.Email attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
INFO [5000] Evaluating 'stringIsInDogDefaultCat' for User '{"Identifier":"12345","Custom1":"user"}' | ||
Evaluating targeting rules and applying the first match if any: | ||
- IF User.Email IS ONE OF [<2 hashed values>] THEN 'Dog' => cannot evaluate, the User.Email attribute is missing | ||
- IF User.Email IS ONE OF ['[email protected]', '[email protected]'] THEN 'Dog' => cannot evaluate, the User.Email attribute is missing | ||
The current targeting rule is ignored and the evaluation continues with the next rule. | ||
- IF User.Custom1 IS ONE OF [<1 hashed value>] THEN 'Dog' => no match | ||
- IF User.Custom1 IS ONE OF ['admin'] THEN 'Dog' => no match | ||
Returning 'Cat'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
{ | ||
"c": [ | ||
{ | ||
"d": { | ||
"p": { | ||
"f": "mainIntFlag", | ||
"c": 0, | ||
"v": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters