Skip to content

feat: add total users insight #15486

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

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Fix tests with expected value correctly
  • Loading branch information
BrunoQuaresma committed Nov 22, 2024
commit fac0c681e4ad442baaae1879ea1d854a93d74ef8
5 changes: 2 additions & 3 deletions coderd/insights_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2364,7 +2364,6 @@ func TestTotalUsersInsight(t *testing.T) {
t.Cleanup(cancel)

// Given: a deployment with many users

dbgen.User(t, db, database.User{
Email: "user1@coder.com",
Username: "user1",
Expand Down Expand Up @@ -2407,7 +2406,7 @@ func TestTotalUsersInsight(t *testing.T) {

// Third day
require.Equal(t, res[2].Date, daysAgo(0).Format(time.DateOnly))
require.Equal(t, res[2].Total, uint64(4))
require.Equal(t, res[2].Total, uint64(5))
})

t.Run("DatesWithNoUserRegistration", func(t *testing.T) {
Expand Down Expand Up @@ -2450,7 +2449,7 @@ func TestTotalUsersInsight(t *testing.T) {

// Third day
require.Equal(t, res[2].Date, daysAgo(0).Format(time.DateOnly))
require.Equal(t, res[2].Total, uint64(2))
require.Equal(t, res[2].Total, uint64(3))
})
}

Expand Down
Loading