@@ -54,7 +54,7 @@ func TestEntitlements(t *testing.T) {
54
54
db := dbmem .New ()
55
55
db .InsertLicense (context .Background (), database.InsertLicenseParams {
56
56
JWT : coderdenttest .GenerateLicense (t , coderdenttest.LicenseOptions {}),
57
- Exp : time .Now ().Add (time .Hour ),
57
+ Exp : dbtime .Now ().Add (time .Hour ),
58
58
})
59
59
entitlements , err := license .Entitlements (context .Background (), db , 1 , 1 , coderdenttest .Keys , empty )
60
60
require .NoError (t , err )
@@ -78,7 +78,7 @@ func TestEntitlements(t *testing.T) {
78
78
return f
79
79
}(),
80
80
}),
81
- Exp : time .Now ().Add (time .Hour ),
81
+ Exp : dbtime .Now ().Add (time .Hour ),
82
82
})
83
83
entitlements , err := license .Entitlements (context .Background (), db , 1 , 1 , coderdenttest .Keys , empty )
84
84
require .NoError (t , err )
@@ -98,10 +98,10 @@ func TestEntitlements(t *testing.T) {
98
98
codersdk .FeatureAuditLog : 1 ,
99
99
},
100
100
101
- GraceAt : time .Now ().Add (- time .Hour ),
102
- ExpiresAt : time .Now ().Add (time .Hour ),
101
+ GraceAt : dbtime .Now ().Add (- time .Hour ),
102
+ ExpiresAt : dbtime .Now ().Add (time .Hour ),
103
103
}),
104
- Exp : time .Now ().Add (time .Hour ),
104
+ Exp : dbtime .Now ().Add (time .Hour ),
105
105
})
106
106
entitlements , err := license .Entitlements (context .Background (), db , 1 , 1 , coderdenttest .Keys , all )
107
107
require .NoError (t , err )
@@ -124,10 +124,10 @@ func TestEntitlements(t *testing.T) {
124
124
codersdk .FeatureAuditLog : 1 ,
125
125
},
126
126
127
- GraceAt : time .Now ().AddDate (0 , 0 , 2 ),
128
- ExpiresAt : time .Now ().AddDate (0 , 0 , 5 ),
127
+ GraceAt : dbtime .Now ().AddDate (0 , 0 , 2 ),
128
+ ExpiresAt : dbtime .Now ().AddDate (0 , 0 , 5 ),
129
129
}),
130
- Exp : time .Now ().AddDate (0 , 0 , 5 ),
130
+ Exp : dbtime .Now ().AddDate (0 , 0 , 5 ),
131
131
})
132
132
133
133
entitlements , err := license .Entitlements (context .Background (), db , 1 , 1 , coderdenttest .Keys , all )
@@ -153,8 +153,8 @@ func TestEntitlements(t *testing.T) {
153
153
codersdk .FeatureAuditLog : 1 ,
154
154
},
155
155
156
- GraceAt : time .Now ().AddDate (0 , 0 , 1 ),
157
- ExpiresAt : time .Now ().AddDate (0 , 0 , 5 ),
156
+ GraceAt : dbtime .Now ().AddDate (0 , 0 , 1 ),
157
+ ExpiresAt : dbtime .Now ().AddDate (0 , 0 , 5 ),
158
158
}),
159
159
Exp : time .Now ().AddDate (0 , 0 , 5 ),
160
160
})
@@ -183,10 +183,10 @@ func TestEntitlements(t *testing.T) {
183
183
},
184
184
185
185
Trial : true ,
186
- GraceAt : time .Now ().AddDate (0 , 0 , 8 ),
187
- ExpiresAt : time .Now ().AddDate (0 , 0 , 5 ),
186
+ GraceAt : dbtime .Now ().AddDate (0 , 0 , 8 ),
187
+ ExpiresAt : dbtime .Now ().AddDate (0 , 0 , 5 ),
188
188
}),
189
- Exp : time .Now ().AddDate (0 , 0 , 5 ),
189
+ Exp : dbtime .Now ().AddDate (0 , 0 , 5 ),
190
190
})
191
191
192
192
entitlements , err := license .Entitlements (context .Background (), db , 1 , 1 , coderdenttest .Keys , all )
@@ -212,10 +212,10 @@ func TestEntitlements(t *testing.T) {
212
212
codersdk .FeatureAuditLog : 1 ,
213
213
},
214
214
215
- GraceAt : time .Now ().AddDate (0 , 0 , 30 ),
216
- ExpiresAt : time .Now ().AddDate (0 , 0 , 5 ),
215
+ GraceAt : dbtime .Now ().AddDate (0 , 0 , 30 ),
216
+ ExpiresAt : dbtime .Now ().AddDate (0 , 0 , 5 ),
217
217
}),
218
- Exp : time .Now ().AddDate (0 , 0 , 5 ),
218
+ Exp : dbtime .Now ().AddDate (0 , 0 , 5 ),
219
219
})
220
220
221
221
entitlements , err := license .Entitlements (context .Background (), db , 1 , 1 , coderdenttest .Keys , all )
0 commit comments