2021-09-15 01:18:39 +00:00
|
|
|
package features
|
2019-10-29 15:30:14 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"reflect"
|
2019-10-29 17:28:41 +00:00
|
|
|
"strings"
|
2019-10-29 15:30:14 +00:00
|
|
|
"testing"
|
2020-07-19 21:08:29 +00:00
|
|
|
|
2022-08-16 12:20:13 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v3/testing/assert"
|
2019-10-29 15:30:14 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestDeprecatedFlags(t *testing.T) {
|
|
|
|
for _, f := range deprecatedFlags {
|
|
|
|
fv := reflect.ValueOf(f)
|
2020-03-19 21:46:44 +00:00
|
|
|
field := reflect.Indirect(fv).FieldByName("Hidden")
|
2020-07-19 21:08:29 +00:00
|
|
|
assert.Equal(t, false, !field.IsValid() || !field.Bool())
|
|
|
|
assert.Equal(t, false, !strings.Contains(reflect.Indirect(fv).FieldByName("Usage").String(), "DEPRECATED. DO NOT USE."))
|
2019-10-29 15:30:14 +00:00
|
|
|
}
|
|
|
|
}
|