@@ -67,19 +67,19 @@ func TestCache_TemplateUsers(t *testing.T) {
67
67
},
68
68
tplWant : want {[]codersdk.DAUEntry {
69
69
{
70
- Date : date (2022 , 8 , 27 ),
70
+ Date : metricscache . OnlyDate ( date (2022 , 8 , 27 ) ),
71
71
Amount : 1 ,
72
72
},
73
73
{
74
- Date : date (2022 , 8 , 28 ),
74
+ Date : metricscache . OnlyDate ( date (2022 , 8 , 28 ) ),
75
75
Amount : 0 ,
76
76
},
77
77
{
78
- Date : date (2022 , 8 , 29 ),
78
+ Date : metricscache . OnlyDate ( date (2022 , 8 , 29 ) ),
79
79
Amount : 0 ,
80
80
},
81
81
{
82
- Date : date (2022 , 8 , 30 ),
82
+ Date : metricscache . OnlyDate ( date (2022 , 8 , 30 ) ),
83
83
Amount : 1 ,
84
84
},
85
85
}, 1 },
@@ -95,15 +95,15 @@ func TestCache_TemplateUsers(t *testing.T) {
95
95
},
96
96
tplWant : want {[]codersdk.DAUEntry {
97
97
{
98
- Date : date (2022 , 8 , 27 ),
98
+ Date : metricscache . OnlyDate ( date (2022 , 8 , 27 ) ),
99
99
Amount : 1 ,
100
100
},
101
101
{
102
- Date : date (2022 , 8 , 28 ),
102
+ Date : metricscache . OnlyDate ( date (2022 , 8 , 28 ) ),
103
103
Amount : 1 ,
104
104
},
105
105
{
106
- Date : date (2022 , 8 , 29 ),
106
+ Date : metricscache . OnlyDate ( date (2022 , 8 , 29 ) ),
107
107
Amount : 1 ,
108
108
},
109
109
}, 1 },
@@ -121,31 +121,31 @@ func TestCache_TemplateUsers(t *testing.T) {
121
121
},
122
122
tplWant : want {[]codersdk.DAUEntry {
123
123
{
124
- Date : date (2022 , 1 , 1 ),
124
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 1 ) ),
125
125
Amount : 2 ,
126
126
},
127
127
{
128
- Date : date (2022 , 1 , 2 ),
128
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 2 ) ),
129
129
Amount : 0 ,
130
130
},
131
131
{
132
- Date : date (2022 , 1 , 3 ),
132
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 3 ) ),
133
133
Amount : 0 ,
134
134
},
135
135
{
136
- Date : date (2022 , 1 , 4 ),
136
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 4 ) ),
137
137
Amount : 1 ,
138
138
},
139
139
{
140
- Date : date (2022 , 1 , 5 ),
140
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 5 ) ),
141
141
Amount : 0 ,
142
142
},
143
143
{
144
- Date : date (2022 , 1 , 6 ),
144
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 6 ) ),
145
145
Amount : 0 ,
146
146
},
147
147
{
148
- Date : date (2022 , 1 , 7 ),
148
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 7 ) ),
149
149
Amount : 2 ,
150
150
},
151
151
}, 2 },
@@ -164,17 +164,17 @@ func TestCache_TemplateUsers(t *testing.T) {
164
164
},
165
165
tplWant : want {[]codersdk.DAUEntry {
166
166
{
167
- Date : date (2022 , 1 , 2 ),
167
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 2 ) ),
168
168
Amount : 2 ,
169
169
},
170
170
}, 2 },
171
171
dauWant : []codersdk.DAUEntry {
172
172
{
173
- Date : date (2022 , 1 , 1 ),
173
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 1 ) ),
174
174
Amount : 2 ,
175
175
},
176
176
{
177
- Date : date (2022 , 1 , 2 ),
177
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 2 ) ),
178
178
Amount : 2 ,
179
179
},
180
180
},
@@ -192,13 +192,13 @@ func TestCache_TemplateUsers(t *testing.T) {
192
192
},
193
193
dauWant : []codersdk.DAUEntry {
194
194
{
195
- Date : date (2022 , 1 , 1 ),
195
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 1 ) ),
196
196
Amount : 2 ,
197
197
},
198
198
},
199
199
tplWant : want {[]codersdk.DAUEntry {
200
200
{
201
- Date : date (2022 , 1 , 2 ),
201
+ Date : metricscache . OnlyDate ( date (2022 , 1 , 2 ) ),
202
202
Amount : 2 ,
203
203
},
204
204
}, 2 },
0 commit comments