Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenmcconkey committed Jun 24, 2022
1 parent 9cdcce9 commit ab33da4
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions evaluation/evaluator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var (
map[string]rest.FeatureConfig{
simple: {
Feature: simple,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &identifierTrue,
},
Expand All @@ -113,7 +113,7 @@ var (
},
theme: {
Feature: theme,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &lighttheme,
},
Expand All @@ -122,7 +122,7 @@ var (
},
size: {
Feature: size,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &mediumSize,
},
Expand All @@ -131,7 +131,7 @@ var (
},
weight: {
Feature: weight,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &heavyWeight,
},
Expand All @@ -140,7 +140,7 @@ var (
},
org: {
Feature: org,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &json2,
},
Expand All @@ -149,7 +149,7 @@ var (
},
invalidInt: {
Feature: invalidInt,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &invalidIntValue,
},
Expand All @@ -163,7 +163,7 @@ var (
},
invalidNumber: {
Feature: invalidNumber,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &invalidNumberValue,
},
Expand All @@ -177,7 +177,7 @@ var (
},
invalidJSON: {
Feature: invalidJSON,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &invalidNumberValue,
},
Expand All @@ -191,7 +191,7 @@ var (
},
simpleWithPrereq: {
Feature: simpleWithPrereq,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &identifierTrue,
},
Expand All @@ -206,7 +206,7 @@ var (
},
prereqNotFound: {
Feature: prereqNotFound,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &identifierTrue,
},
Expand All @@ -222,7 +222,7 @@ var (
prereqVarNotFound: {
Feature: prereqVarNotFound,
OffVariation: offVariation,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &identifierTrue,
},
Expand All @@ -237,7 +237,7 @@ var (
},
notValidFlag: {
Feature: notValidFlag,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &empty,
},
Expand Down Expand Up @@ -952,7 +952,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
args: args{
fc: rest.FeatureConfig{
OffVariation: offVariation,
State: rest.Off,
State: rest.FeatureStateOff,
Variations: boolVariations,
},
},
Expand All @@ -964,7 +964,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
args: args{
fc: rest.FeatureConfig{
OffVariation: offVariation,
State: rest.Off,
State: rest.FeatureStateOff,
Variations: boolVariations,
},
target: &Target{
Expand All @@ -978,7 +978,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
name: "evaluate flag should return default serve variation",
args: args{
fc: rest.FeatureConfig{
State: rest.On,
State: rest.FeatureStateOn,
Variations: boolVariations,
DefaultServe: rest.Serve{
Variation: &boolVariations[0].Value,
Expand All @@ -995,7 +995,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
name: "evaluate flag should return default serve distribution",
args: args{
fc: rest.FeatureConfig{
State: rest.On,
State: rest.FeatureStateOn,
Variations: boolVariations,
DefaultServe: rest.Serve{
Distribution: &rest.Distribution{
Expand Down Expand Up @@ -1023,7 +1023,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
name: "evaluate flag should return rule serve",
args: args{
fc: rest.FeatureConfig{
State: rest.On,
State: rest.FeatureStateOn,
Variations: boolVariations,
Rules: &[]rest.ServingRule{
{
Expand Down Expand Up @@ -1051,7 +1051,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
name: "evaluate flag using variationMap and target should return 'true'",
args: args{
fc: rest.FeatureConfig{
State: rest.On,
State: rest.FeatureStateOn,
Variations: boolVariations,
VariationToTargetMap: &[]rest.VariationMap{
{
Expand All @@ -1075,7 +1075,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
name: "evaluate flag variation returns an error",
args: args{
fc: rest.FeatureConfig{
State: rest.On,
State: rest.FeatureStateOn,
},
target: &Target{
Identifier: targetIdentifier,
Expand Down Expand Up @@ -1240,7 +1240,7 @@ func TestEvaluator_checkPreRequisite(t *testing.T) {
},
args: args{
parent: &rest.FeatureConfig{
State: rest.On,
State: rest.FeatureStateOn,
Prerequisites: &[]rest.Prerequisite{
{
Feature: simple,
Expand All @@ -1258,7 +1258,7 @@ func TestEvaluator_checkPreRequisite(t *testing.T) {
},
args: args{
parent: &rest.FeatureConfig{
State: rest.On,
State: rest.FeatureStateOn,
Prerequisites: &[]rest.Prerequisite{
{
Feature: "prereq not found",
Expand Down

0 comments on commit ab33da4

Please sign in to comment.