@@ -88,34 +88,34 @@ func TestNewRecord(t *testing.T) {
8888 eol := time .Now ().Add (time .Hour )
8989 ttl := time .Minute * 10
9090
91- t .Run ("V2 only record by default" , func (t * testing.T ) {
91+ t .Run ("V1+ V2 records by default" , func (t * testing.T ) {
9292 t .Parallel ()
9393
9494 rec := mustNewRecord (t , sk , testPath , seq , eol , ttl )
95- require .Empty (t , rec .pb .SignatureV1 )
95+ require .NotEmpty (t , rec .pb .SignatureV1 )
9696
9797 _ , err := rec .PubKey ()
9898 require .ErrorIs (t , err , ErrPublicKeyNotFound )
9999
100100 fieldsMatch (t , rec , testPath , seq , eol , ttl )
101- require .Empty (t , rec .pb .GetValue ())
102- require .Empty (t , rec .pb .GetSequence ())
103- require .Empty (t , rec .pb .GetValidity ())
104- require .Empty (t , rec .pb .GetValidityType ())
105- require .Empty (t , rec .pb .GetTtl ())
101+ fieldsMatchV1 (t , rec , testPath , seq , eol , ttl )
106102 })
107103
108- t .Run ("V1+V2 with option" , func (t * testing.T ) {
104+ t .Run ("V2 records with option" , func (t * testing.T ) {
109105 t .Parallel ()
110106
111- rec := mustNewRecord (t , sk , testPath , seq , eol , ttl , WithV1Compatibility (true ))
112- require .NotEmpty (t , rec .pb .SignatureV1 )
107+ rec := mustNewRecord (t , sk , testPath , seq , eol , ttl , WithV1Compatibility (false ))
108+ require .Empty (t , rec .pb .SignatureV1 )
113109
114110 _ , err := rec .PubKey ()
115111 require .ErrorIs (t , err , ErrPublicKeyNotFound )
116112
117113 fieldsMatch (t , rec , testPath , seq , eol , ttl )
118- fieldsMatchV1 (t , rec , testPath , seq , eol , ttl )
114+ require .Empty (t , rec .pb .GetValue ())
115+ require .Empty (t , rec .pb .GetSequence ())
116+ require .Empty (t , rec .pb .GetValidity ())
117+ require .Empty (t , rec .pb .GetValidityType ())
118+ require .Empty (t , rec .pb .GetTtl ())
119119 })
120120
121121 t .Run ("Public key embedded by default for RSA and ECDSA keys" , func (t * testing.T ) {
0 commit comments