prysm-pulse/config/features/deprecated_flags_test.go

19 lines
460 B
Go
Raw Normal View History

package features
import (
"reflect"
2019-10-29 17:28:41 +00:00
"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."))
}
}