File tree Expand file tree Collapse file tree 5 files changed +44
-1
lines changed Expand file tree Collapse file tree 5 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "flags" : {
3+ "selector-flag" : {
4+ "state" : " ENABLED" ,
5+ "variants" : {
6+ "foo" : " foo" ,
7+ "bar" : " bar"
8+ },
9+ "defaultVariant" : " foo"
10+ }
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ @in-process
2+ Feature : flagd selector
3+
4+ Background :
5+ Given an option "selector" of type "String" with value "rawflags/selector-flags.json"
6+ And a stable flagd provider
7+
8+ Scenario Outline : Flags not found
9+ Given a <type> -flag with key "<key>" and a default value "<default>"
10+ When the flag was evaluated with details
11+ Then the reason should be "ERROR"
12+
13+ Examples :
14+ | key | type | default |
15+ | boolean -flag | Boolean | false |
16+ | string -flag | String | bye |
17+ | integer -flag | Integer | 1 |
18+ | float -flag | Float | 0 .1 |
19+
20+ Scenario : Resolve values
21+ Given a String-flag with key "selector-flag" and a default value "foo"
22+ When the flag was evaluated with details
23+ Then the reason should be "STATIC"
Original file line number Diff line number Diff line change 33 {
44 "uri" : " flags/allFlags.json" ,
55 "provider" : " file"
6+ },
7+ {
8+ "uri" : " rawflags/selector-flags.json" ,
9+ "provider" : " file"
610 }
711 ]
812}
Original file line number Diff line number Diff line change 55 {
66 "uri" : " flags/allFlags.json" ,
77 "provider" : " file"
8+ },
9+ {
10+ "uri" : " rawflags/selector-flags.json" ,
11+ "provider" : " file"
812 }
913 ]
1014}
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ func CombineJSONFiles() error {
229229
230230 for _ , file := range files {
231231 fmt .Printf ("read JSON %s\n " , file .Name ())
232- if filepath .Ext (file .Name ()) == ".json" {
232+ if filepath .Ext (file .Name ()) == ".json" && file . Name () != "selector-flags.json" {
233233 filePath := filepath .Join (inputDir , file .Name ())
234234 content , err := ioutil .ReadFile (filePath )
235235 if err != nil {
You can’t perform that action at this time.
0 commit comments