Skip to content
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

feat(testing): databricks test suite #5311

Merged
merged 28 commits into from
Sep 24, 2022
Merged

Conversation

frolovdev
Copy link
Contributor

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue Reference this PR resolves

[For example #12]

Description of Changes Made (if issue reference is not provided)

[Description goes here]

@frolovdev frolovdev changed the title New databricks test suite WIP: New databricks test suite Sep 15, 2022
@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Sep 15, 2022
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Base: 60.15% // Head: 60.15% // No change to project coverage 👍

Coverage data is based on head (bccf2d8) compared to base (3dcbd2e).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #5311    +/-   ##
========================================
  Coverage   60.15%   60.15%            
========================================
  Files         140      140            
  Lines       11684    11684            
  Branches     2945     2853    -92     
========================================
  Hits         7028     7028            
- Misses       4150     4368   +218     
+ Partials      506      288   -218     
Flag Coverage Δ
cube-backend 60.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/cubejs-api-gateway/src/jwk.ts 11.47% <0.00%> (ø)
packages/cubejs-backend-shared/src/env.ts 30.64% <0.00%> (ø)
packages/cubejs-api-gateway/src/gateway.ts 70.27% <0.00%> (ø)
packages/cubejs-api-gateway/src/graphql.ts 4.16% <0.00%> (ø)
packages/cubejs-backend-shared/src/time.ts 28.57% <0.00%> (ø)
packages/cubejs-backend-shared/src/proxy.ts 23.52% <0.00%> (ø)
packages/cubejs-backend-shared/src/track.ts 29.72% <0.00%> (ø)
packages/cubejs-backend-shared/src/errors.ts 28.57% <0.00%> (ø)
packages/cubejs-api-gateway/src/sql-server.ts 5.12% <0.00%> (ø)
packages/cubejs-backend-shared/src/helpers.ts 56.75% <0.00%> (ø)
... and 25 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@frolovdev frolovdev changed the title WIP: New databricks test suite feat: databricks test suite Sep 16, 2022
@frolovdev frolovdev marked this pull request as ready for review September 16, 2022 14:24
@frolovdev frolovdev requested a review from a team as a code owner September 16, 2022 14:24
@@ -518,6 +531,7 @@ export async function startBirdBoxFromCli(
CUBEJS_API_SECRET: 'mysupersecret',
CUBEJS_WEB_SOCKETS: 'true',
CUBEJS_PLAYGROUND_AUTH_SECRET: 'mysupersecret',
CUBEJS_TELEMETRY: 'false',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📓 I guess it's useless to use telemetry in tests

@@ -509,6 +520,8 @@ export async function startBirdBoxFromCli(
);
}

fs.writeFileSync(path.join(testDir, 'package.json'), '{}', { encoding: 'utf-8' });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📓 required to avoid such error

RequestError: Error: ENOENT: no such file or directory, open ‘package.json’

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests don't pass without it

@@ -37,6 +41,10 @@ export const DATE_CAST = {
DATE_PREFIX: 'to_date(',
DATE_SUFFIX: ', \'YYYY-MM-DD\')',
},
'databricks-jdbc': {
DATE_PREFIX: 'to_date(',
DATE_SUFFIX: ', \'y-M-d\')',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📓 spark casting

@@ -0,0 +1,9 @@
// Cube.js configuration options: https://cube.dev/docs/config
module.exports = {
queryRewrite: (query) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this? We do not use the Orders cube in the test suit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an accidental copypaste from Postgres

@@ -509,6 +520,8 @@ export async function startBirdBoxFromCli(
);
}

fs.writeFileSync(path.join(testDir, 'package.json'), '{}', { encoding: 'utf-8' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is required.

@buntarb buntarb changed the title feat: databricks test suite feat(testing): databricks test suite Sep 23, 2022
@frolovdev frolovdev merged commit b77f33b into master Sep 24, 2022
@frolovdev frolovdev deleted the new-databricks-test-suite branch September 24, 2022 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:community Contribution from Cube.js community members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants