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

test: Add connection v1 tests #104

Merged
merged 2 commits into from
Jun 18, 2024
Merged

test: Add connection v1 tests #104

merged 2 commits into from
Jun 18, 2024

Conversation

ptiurin
Copy link
Collaborator

@ptiurin ptiurin commented Jun 13, 2024

Some basic tests to improve coverage.

@ptiurin ptiurin marked this pull request as ready for review June 13, 2024 14:31
@ptiurin ptiurin requested a review from a team as a code owner June 13, 2024 14:31
Copy link

@alexradzin alexradzin left a comment

Choose a reason for hiding this comment

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

I am approving this PR because but I do not have enough expertise in this code. Please take a look on my comments too.

}),
// Get account id
rest.get(
`https://${apiEndpoint}/iam/v2/accounts:getIdByName`,

Choose a reason for hiding this comment

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

shouldn't URL contain query parameter accountName=blblblbla ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It doesn't need to since otherwise it accepts all parameters. However, we sure can check that it was passed correctly. I've added an expect statement.

}
),
// Get default account
rest.get(`https://${apiEndpoint}/iam/v2/account`, (req, res, ctx) => {

Choose a reason for hiding this comment

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

at least in JDBC and .NET we use core/v1/account and core/v1/accounts for this is purpose. Is there a chance that I have to change the JDBC and .NET or these tests are wrong?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are you sure these drivers use core/v1 endpoints for the same operations? This is for getting default account (/iam/v2/account) or resolving account name to an id (iam/v2/accounts:getIdByName)
Firebolt 2.0 uses web/v3/account for these operations btw.

Copy link

sonarcloud bot commented Jun 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@ptiurin ptiurin merged commit fe7e1a3 into main Jun 18, 2024
3 checks passed
@ptiurin ptiurin deleted the test-connection-v1 branch June 18, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants