-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from subiradhikari/FFM-744
FFM-744: Changes to send target in authentication request
- Loading branch information
Showing
7 changed files
with
67 additions
and
43 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
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 |
---|---|---|
|
@@ -435,12 +435,13 @@ func TestFeatureConfig_IntVariation(t *testing.T) { | |
} | ||
|
||
func TestServingRules_GetVariationName(t *testing.T) { | ||
|
||
f := false | ||
dev := "dev" | ||
harness := "Harness" | ||
onVariationIdentifier := "v1" | ||
offVariationIdentifier := "v2" | ||
|
||
m := make(map[string]interface{}) | ||
m["email"] = "[email protected]" | ||
segment := &Segment{ | ||
Identifier: "beta", | ||
Name: "beta", | ||
|
@@ -450,12 +451,11 @@ func TestServingRules_GetVariationName(t *testing.T) { | |
Tags: nil, | ||
Version: 1, | ||
} | ||
|
||
target := &Target{ | ||
Identifier: harness, | ||
Name: &harness, | ||
Anonymous: false, | ||
Attributes: nil, | ||
Anonymous: &f, | ||
Attributes: &m, | ||
} | ||
type args struct { | ||
target *Target | ||
|
@@ -532,14 +532,17 @@ func TestServingRules_GetVariationName(t *testing.T) { | |
} | ||
|
||
func TestFeatureConfig_Evaluate(t *testing.T) { | ||
f := false | ||
harness := "Harness" | ||
v1 := "v1" | ||
v2 := "v2" | ||
m := make(map[string]interface{}) | ||
m["email"] = "[email protected]" | ||
target := Target{ | ||
Identifier: harness, | ||
Name: nil, | ||
Anonymous: false, | ||
Attributes: nil, | ||
Anonymous: &f, | ||
Attributes: &m, | ||
} | ||
type fields struct { | ||
DefaultServe Serve | ||
|
@@ -620,6 +623,7 @@ func TestFeatureConfig_Evaluate(t *testing.T) { | |
} | ||
|
||
func TestClause_Evaluate(t *testing.T) { | ||
f := false | ||
type fields struct { | ||
Attribute string | ||
ID string | ||
|
@@ -632,14 +636,13 @@ func TestClause_Evaluate(t *testing.T) { | |
segments Segments | ||
operator types.ValueType | ||
} | ||
|
||
m := make(map[string]interface{}) | ||
m["email"] = "[email protected]" | ||
target := Target{ | ||
Identifier: "john", | ||
Name: nil, | ||
Anonymous: false, | ||
Attributes: map[string]interface{}{ | ||
"email": "[email protected]", | ||
}, | ||
Anonymous: &f, | ||
Attributes: &m, | ||
} | ||
tests := []struct { | ||
name string | ||
|
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 |
---|---|---|
|
@@ -6,15 +6,16 @@ import ( | |
) | ||
|
||
func TestGetStructFieldValue(t *testing.T) { | ||
m := make(map[string]interface{}) | ||
m["email"] = "[email protected]" | ||
identifier := "john" | ||
name := "John" | ||
f := false | ||
target := Target{ | ||
Identifier: identifier, | ||
Name: &name, | ||
Anonymous: false, | ||
Attributes: map[string]interface{}{ | ||
"email": "[email protected]", | ||
}, | ||
Anonymous: &f, | ||
Attributes: &m, | ||
} | ||
type args struct { | ||
target interface{} | ||
|
@@ -55,13 +56,14 @@ func TestGetStructFieldValue(t *testing.T) { | |
func Test_caseInsensitiveFieldByName(t *testing.T) { | ||
identifier := "john" | ||
name := "John" | ||
m := make(map[string]interface{}) | ||
m["email"] = "[email protected]" | ||
f := false | ||
target := Target{ | ||
Identifier: identifier, | ||
Name: &name, | ||
Anonymous: false, | ||
Attributes: map[string]interface{}{ | ||
"email": "[email protected]", | ||
}, | ||
Anonymous: &f, | ||
Attributes: &m, | ||
} | ||
type args struct { | ||
v reflect.Value | ||
|
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 |
---|---|---|
|
@@ -22,14 +22,14 @@ func TestSegment_Evaluate(t *testing.T) { | |
type args struct { | ||
target *Target | ||
} | ||
|
||
f := false | ||
m := make(map[string]interface{}) | ||
m["email"] = "[email protected]" | ||
target := Target{ | ||
Identifier: "john", | ||
Name: nil, | ||
Anonymous: false, | ||
Attributes: map[string]interface{}{ | ||
"email": "[email protected]", | ||
}, | ||
Anonymous: &f, | ||
Attributes: &m, | ||
} | ||
|
||
tests := []struct { | ||
|
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