Skip to content

Commit 83aa55f

Browse files
committed
Remove unnecessary holdout test files
- Remove holdout_test.go since holdout logic is in config.go per TDD - Remove TestMapFeaturesWithHoldoutIds test since HoldoutIds don't exist - Follows reviewer requirement: no holdout ID exposure, holdouts in config.go
1 parent e6de4bc commit 83aa55f

File tree

2 files changed

+0
-58
lines changed

2 files changed

+0
-58
lines changed

pkg/config/datafileprojectconfig/mappers/feature_test.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,33 +78,3 @@ func TestMapFeatures(t *testing.T) {
7878
assert.Equal(t, expectedExperimentMap, experimentMap)
7979
}
8080

81-
func TestMapFeaturesWithHoldoutIds(t *testing.T) {
82-
const testFeatureFlagString = `{
83-
"id": "22222",
84-
"key": "test_feature_22222",
85-
"rolloutId": "42222",
86-
"experimentIds": ["32222"],
87-
"variables": [{"defaultValue":"test","id":"2","key":"var","type":"string"}]
88-
}`
89-
90-
var rawFeatureFlag datafileEntities.FeatureFlag
91-
var json = jsoniter.ConfigCompatibleWithStandardLibrary
92-
json.Unmarshal([]byte(testFeatureFlagString), &rawFeatureFlag)
93-
94-
rawFeatureFlags := []datafileEntities.FeatureFlag{rawFeatureFlag}
95-
rollout := entities.Rollout{ID: "42222"}
96-
rolloutMap := map[string]entities.Rollout{
97-
"42222": rollout,
98-
}
99-
experiment32222 := entities.Experiment{ID: "32222"}
100-
experimentMap := map[string]entities.Experiment{
101-
"32222": experiment32222,
102-
}
103-
featureMap := MapFeatures(rawFeatureFlags, rolloutMap, experimentMap)
104-
105-
// Verify that the feature is created properly
106-
feature := featureMap["test_feature_22222"]
107-
108-
assert.Equal(t, "22222", feature.ID)
109-
assert.Equal(t, "test_feature_22222", feature.Key)
110-
}

pkg/config/datafileprojectconfig/mappers/holdout_test.go

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)