File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ func TestAddFlags(t *testing.T) {
5454
5555 // Test specific flags
5656 assertFlagValue (t , flags , FlagDBPath , DefaultConfig ().DBPath )
57+ assertFlagValue (t , flags , FlagClearCache , false )
5758
5859 // Node flags
5960 assertFlagValue (t , flags , FlagAggregator , DefaultConfig ().Node .Aggregator )
@@ -104,25 +105,8 @@ func TestAddFlags(t *testing.T) {
104105 // RPC flags
105106 assertFlagValue (t , flags , FlagRPCAddress , DefaultConfig ().RPC .Address )
106107
107- // Count the number of flags we're explicitly checking
108- expectedFlagCount := 39 // Update this number if you add more flag checks above
109-
110- // Get the actual number of flags (both regular and persistent)
111- actualFlagCount := 0
112- flags .VisitAll (func (flag * pflag.Flag ) {
113- actualFlagCount ++
114- })
115- persistentFlags .VisitAll (func (flag * pflag.Flag ) {
116- actualFlagCount ++
117- })
118-
119- // Verify that the counts match
120- assert .Equal (
121- t ,
122- expectedFlagCount ,
123- actualFlagCount ,
124- "Number of flags doesn't match. If you added a new flag, please update the test." ,
125- )
108+ // Sync flags
109+ assertFlagValue (t , flags , FlagSyncP2PPrefer , false )
126110}
127111
128112func TestLoad (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments