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

Making progress towards deleting sql.spec.ts. #13734

Merged
merged 4 commits into from
May 21, 2024
Merged

Conversation

samwho
Copy link
Collaborator

@samwho samwho commented May 21, 2024

Description

The main aim of this PR is to delete sql.spec.ts, replacing the things it's testing with integration tests in either search.spec.ts, row.spec.ts, or table.spec.ts.

I haven't achieved that, but I have managed to shorten it so it has much less overlap with existing integration tests.

On my way through this, I renamed external.spec.ts to search.spec.ts and upgraded it to a generic test against all datasources for our search SDK. Its job is to test whatever can't be tested through the API.

I felt I'd hit a good checkpoint, but would like to follow this up with another PR further trimming down what's in sql.spec.ts.

@samwho samwho requested a review from mike12345567 May 21, 2024 10:53
@samwho samwho requested a review from a team as a code owner May 21, 2024 10:53
@@ -709,99 +267,4 @@ describe("SQL query builder", () => {
sql: `insert into "test" ("name") values ($1) returning *`,
})
})

it("should be able to rename column for MySQL", () => {
const table: Table = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this covered as part of the table tests now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had thought it was but on second look it's not. I'll add rename tests to table.spec.ts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay looked closer and we do have a test for this, "updates all the row fields for a table when a schema key is renamed" in table.spec.ts

@samwho samwho requested a review from mike12345567 May 21, 2024 13:03
@samwho samwho enabled auto-merge May 21, 2024 13:05
@samwho samwho merged commit 4826138 into master May 21, 2024
10 checks passed
@samwho samwho deleted the delete-sql-spec-ts branch May 21, 2024 14:51
@github-actions github-actions bot locked and limited conversation to collaborators May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants