Skip to content

Commit

Permalink
fixing the year issue in TestStepAggregate
Browse files Browse the repository at this point in the history
The TestStepAggregate function in exec_aggregate_test.go contained the
current year hardcoded. Now, it's dynamic.
  • Loading branch information
szamuboy authored and Fajfa committed Jan 4, 2024
1 parent db2bdf3 commit 3bb5dd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/pkg/dal/exec_aggregate_test.go
Expand Up @@ -3,6 +3,7 @@ package dal
import (
"context"
"testing"
"time"

"github.com/cortezaproject/corteza/server/pkg/filter"
"github.com/cortezaproject/corteza/server/pkg/ql"
Expand Down Expand Up @@ -632,7 +633,6 @@ func TestStepAggregate(t *testing.T) {
},
group: []simpleAttribute{{
ident: "d",
// @note will only run for a year then will need to be changed
expr: "year(now())",
}},
outAttributes: []simpleAttribute{{
Expand All @@ -647,7 +647,7 @@ func TestStepAggregate(t *testing.T) {
},

out: []simpleRow{
{"d": 2023, "users": float64(3)},
{"d": time.Now().Year(), "users": float64(3)},
},

f: internalFilter{
Expand Down

0 comments on commit 3bb5dd9

Please sign in to comment.