Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Jan 6, 2024
1 parent a8efbe6 commit d1a9bd9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/cubejs-backend-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"cargo-cp-artifact": "^0.1",
"jest": "^27",
"mysql2": "^2.3.3",
"typescript": "~5.2.2"
"typescript": "~5.2.2",
"uuid": "^8.3.2"
},
"dependencies": {
"@cubejs-backend/cubesql": "^0.34.41",
Expand Down
5 changes: 4 additions & 1 deletion packages/cubejs-backend-native/test/meta.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const uuidv4 = require('uuid').v4;

module.exports = {
cubes: [
{
Expand Down Expand Up @@ -215,5 +217,6 @@ module.exports = {
],
segments: []
}
]
],
compilerId: uuidv4()
};
5 changes: 3 additions & 2 deletions packages/cubejs-backend-native/test/sql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ describe('SQLInterface', () => {
password: null,
});

expect(meta.mock.calls.length).toEqual(1);
expect(meta.mock.calls.length).toEqual(3);
expect(meta.mock.calls[0][0]).toEqual({
request: {
id: expect.any(String),
Expand All @@ -250,7 +250,8 @@ describe('SQLInterface', () => {
user: 'allowed_user',
superuser: false,
securityContext: { foo: 'bar' },
}
},
onlyCompilerId: true
});

try {
Expand Down
2 changes: 1 addition & 1 deletion rust/cubesql/cubesql/e2e/tests/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ impl PostgresIntegrationTestSuite {

assert_eq!(
err.to_string(),
"db error: ERROR: Unexpected panic. Reason: attempt to multiply with overflow"
"db error: ERROR: Unexpected panic. Reason: value can not be represented in a timestamp with nanosecond precision."
);

Ok(())
Expand Down

0 comments on commit d1a9bd9

Please sign in to comment.