Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenmcconkey committed Jun 23, 2022
1 parent 9afb011 commit 13c00da
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 @@ -102,7 +102,7 @@ var (
map[string]rest.FeatureConfig{
simple: {
Feature: simple,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &identifierTrue,
},
Expand All @@ -111,7 +111,7 @@ var (
},
theme: {
Feature: theme,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &lighttheme,
},
Expand All @@ -120,7 +120,7 @@ var (
},
size: {
Feature: size,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &mediumSize,
},
Expand All @@ -129,7 +129,7 @@ var (
},
weight: {
Feature: weight,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &heavyWeight,
},
Expand All @@ -138,7 +138,7 @@ var (
},
org: {
Feature: org,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &json2,
},
Expand All @@ -147,7 +147,7 @@ var (
},
invalidInt: {
Feature: invalidInt,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &invalidIntValue,
},
Expand All @@ -161,7 +161,7 @@ var (
},
invalidNumber: {
Feature: invalidNumber,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &invalidNumberValue,
},
Expand All @@ -175,7 +175,7 @@ var (
},
invalidJSON: {
Feature: invalidJSON,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &invalidNumberValue,
},
Expand All @@ -189,7 +189,7 @@ var (
},
simpleWithPrereq: {
Feature: simpleWithPrereq,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &identifierTrue,
},
Expand All @@ -204,7 +204,7 @@ var (
},
prereqNotFound: {
Feature: prereqNotFound,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &identifierTrue,
},
Expand All @@ -220,7 +220,7 @@ var (
prereqVarNotFound: {
Feature: prereqVarNotFound,
OffVariation: offVariation,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &identifierTrue,
},
Expand All @@ -235,7 +235,7 @@ var (
},
notValidFlag: {
Feature: notValidFlag,
State: rest.On,
State: rest.FeatureStateOn,
DefaultServe: rest.Serve{
Variation: &empty,
},
Expand Down Expand Up @@ -944,7 +944,7 @@ func TestEvaluator_evaluateFlag(t *testing.T) {
args: args{
fc: rest.FeatureConfig{
OffVariation: offVariation,
State: rest.Off,
State: rest.FeatureStateOff,
Variations: boolVariations,
},
},
Expand All @@ -956,7 +956,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 @@ -970,7 +970,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 @@ -987,7 +987,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 @@ -1015,7 +1015,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 @@ -1043,7 +1043,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 @@ -1067,7 +1067,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 @@ -1230,7 +1230,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 @@ -1248,7 +1248,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 13c00da

Please sign in to comment.