Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: remove empty case for metricscache #6473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions coderd/metricscache/metricscache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ func TestCache_TemplateUsers(t *testing.T) {
Provisioner: database.ProvisionerTypeEcho,
})

gotUniqueUsers, ok := cache.TemplateUniqueUsers(template.ID)
require.False(t, ok, "template shouldn't have loaded yet")
require.EqualValues(t, -1, gotUniqueUsers)

for _, row := range tt.args.rows {
row.TemplateID = template.ID
db.InsertWorkspaceAgentStat(context.Background(), row)
Expand All @@ -189,7 +185,7 @@ func TestCache_TemplateUsers(t *testing.T) {
"TemplateDAUs never populated",
)

gotUniqueUsers, ok = cache.TemplateUniqueUsers(template.ID)
gotUniqueUsers, ok := cache.TemplateUniqueUsers(template.ID)
require.True(t, ok)

gotEntries, ok := cache.TemplateDAUs(template.ID)
Expand Down