@@ -1774,35 +1774,35 @@ func TestParseEncryptionSpec(t *testing.T) {
1774
1774
"path=/data,key=/new.key,old-key=/old.key" , "" ,
1775
1775
storeEncryptionSpec {Path : "/data" ,
1776
1776
Options : storageconfig.EncryptionOptions {
1777
- KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "/old.key" },
1778
- DataKeyRotationPeriod : int64 ( storageconfig .DefaultRotationPeriod / time . Second ) ,
1777
+ KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "/old.key" },
1778
+ RotationPeriod : storageconfig .DefaultRotationPeriod ,
1779
1779
},
1780
1780
},
1781
1781
},
1782
1782
{
1783
1783
"path=/data,key=/new.key,old-key=/old.key,rotation-period=1h" , "" ,
1784
1784
storeEncryptionSpec {Path : "/data" ,
1785
1785
Options : storageconfig.EncryptionOptions {
1786
- KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "/old.key" },
1787
- DataKeyRotationPeriod : int64 ( time .Hour / time . Second ) ,
1786
+ KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "/old.key" },
1787
+ RotationPeriod : time .Hour ,
1788
1788
},
1789
1789
},
1790
1790
},
1791
1791
{
1792
1792
"path=/data,key=plain,old-key=/old.key,rotation-period=1h" , "" ,
1793
1793
storeEncryptionSpec {Path : "/data" ,
1794
1794
Options : storageconfig.EncryptionOptions {
1795
- KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "plain" , OldKey : "/old.key" },
1796
- DataKeyRotationPeriod : int64 ( time .Hour / time . Second ) ,
1795
+ KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "plain" , OldKey : "/old.key" },
1796
+ RotationPeriod : time .Hour ,
1797
1797
},
1798
1798
},
1799
1799
},
1800
1800
{
1801
1801
"path=/data,key=/new.key,old-key=plain,rotation-period=1h" , "" ,
1802
1802
storeEncryptionSpec {Path : "/data" ,
1803
1803
Options : storageconfig.EncryptionOptions {
1804
- KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "plain" },
1805
- DataKeyRotationPeriod : int64 ( time .Hour / time . Second ) ,
1804
+ KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "plain" },
1805
+ RotationPeriod : time .Hour ,
1806
1806
},
1807
1807
},
1808
1808
},
@@ -1812,8 +1812,8 @@ func TestParseEncryptionSpec(t *testing.T) {
1812
1812
"path=data,key=/new.key,old-key=/old.key" , "" ,
1813
1813
storeEncryptionSpec {Path : absDataPath ,
1814
1814
Options : storageconfig.EncryptionOptions {
1815
- KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "/old.key" },
1816
- DataKeyRotationPeriod : int64 ( storageconfig .DefaultRotationPeriod / time . Second ) ,
1815
+ KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "/old.key" },
1816
+ RotationPeriod : storageconfig .DefaultRotationPeriod ,
1817
1817
},
1818
1818
},
1819
1819
},
@@ -1823,8 +1823,8 @@ func TestParseEncryptionSpec(t *testing.T) {
1823
1823
"path=*,key=/new.key,old-key=/old.key" , "" ,
1824
1824
storeEncryptionSpec {Path : "*" ,
1825
1825
Options : storageconfig.EncryptionOptions {
1826
- KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "/old.key" },
1827
- DataKeyRotationPeriod : int64 ( storageconfig .DefaultRotationPeriod / time . Second ) ,
1826
+ KeyFiles : & storageconfig.EncryptionKeyFiles {CurrentKey : "/new.key" , OldKey : "/old.key" },
1827
+ RotationPeriod : storageconfig .DefaultRotationPeriod ,
1828
1828
},
1829
1829
},
1830
1830
},
0 commit comments