Skip to content

Commit 1706acd

Browse files
committed
Fix up some failing tests
1 parent e3727cd commit 1706acd

3 files changed

Lines changed: 5 additions & 20 deletions

File tree

e2e/cost_estimator_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,11 @@ func TestEstimateCost(t *testing.T) {
2929
timestamp
3030
value
3131
}
32-
dimoAftermarketWPAState {
33-
timestamp
34-
value
35-
}
3632
currentLocationHeading {
3733
timestamp
3834
value
3935
}
40-
currentLocationIsRedacted {
41-
timestamp
42-
value
43-
}
44-
loc2: currentLocationIsRedacted {
45-
timestamp
46-
value
47-
}
48-
49-
5036
}
51-
5237
}`
5338

5439
// Execute request

e2e/permission_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ func TestPermission(t *testing.T) {
7474
query: `query {
7575
signalsLatest(tokenId: 39718) {
7676
lastSeen
77-
currentLocationLatitude {
78-
value
77+
currentLocationCoordinates {
78+
value { latitude longitude hdop }
7979
}
8080
}
8181
}`,

internal/repositories/validate_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func TestValidateSegmentArgs(t *testing.T) {
8686
})
8787

8888
t.Run("date range exceeded", func(t *testing.T) {
89-
from := validTo.Add(-32 * 24 * time.Hour) // max is 31 days
89+
from := validTo.Add(-33 * 24 * time.Hour) // max is 32 days
9090
err := validateSegmentArgs(1, from, validTo)
9191
require.Error(t, err)
9292
})
@@ -111,8 +111,8 @@ func TestValidateSegmentDateRange(t *testing.T) {
111111
require.NoError(t, validateSegmentDateRange(from, to))
112112
})
113113

114-
t.Run("31 days plus 2 seconds fails", func(t *testing.T) {
115-
from := to.Add(-31*24*time.Hour - 2*time.Second)
114+
t.Run("32 days plus 2 seconds fails", func(t *testing.T) {
115+
from := to.Add(-32*24*time.Hour - 2*time.Second)
116116
require.Error(t, validateSegmentDateRange(from, to))
117117
})
118118
}

0 commit comments

Comments
 (0)