prysm-pulse/config/features/deprecated_flags_test.go
Raul Jordan a9a4bb9163
Move Shared/Testutil into Testing (#9659)
* move testutil

* util pkg

* build

* gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-23 18:53:46 +00:00

19 lines
460 B
Go

package features
import (
"reflect"
"strings"
"testing"
"github.com/prysmaticlabs/prysm/testing/assert"
)
func TestDeprecatedFlags(t *testing.T) {
for _, f := range deprecatedFlags {
fv := reflect.ValueOf(f)
field := reflect.Indirect(fv).FieldByName("Hidden")
assert.Equal(t, false, !field.IsValid() || !field.Bool())
assert.Equal(t, false, !strings.Contains(reflect.Indirect(fv).FieldByName("Usage").String(), "DEPRECATED. DO NOT USE."))
}
}