2021-09-14 18:18:39 -07:00
|
|
|
package features
|
2019-10-29 11:30:14 -04:00
|
|
|
|
|
|
|
import (
|
|
|
|
"reflect"
|
2019-10-29 13:28:41 -04:00
|
|
|
"strings"
|
2019-10-29 11:30:14 -04:00
|
|
|
"testing"
|
2020-07-19 14:08:29 -07:00
|
|
|
|
2024-02-14 21:46:47 -08:00
|
|
|
"github.com/prysmaticlabs/prysm/v5/testing/assert"
|
2019-10-29 11:30:14 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestDeprecatedFlags(t *testing.T) {
|
|
|
|
for _, f := range deprecatedFlags {
|
|
|
|
fv := reflect.ValueOf(f)
|
2020-03-19 14:46:44 -07:00
|
|
|
field := reflect.Indirect(fv).FieldByName("Hidden")
|
2020-07-19 14:08:29 -07: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 11:30:14 -04:00
|
|
|
}
|
|
|
|
}
|