Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Li <lnse@amazon.com>
  • Loading branch information
sejli committed Feb 19, 2025
1 parent 3a695da commit 6b8e830
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
DS_API,
DSM_API,
S3_CLUSTER,
DELETE_API,
JOBS_API,
} from '../../../../../utils/apps/query_enhancements/constants';
import { getRandomizedWorkspaceName } from '../../../../../utils/apps/query_enhancements/shared';
import { prepareTestSuite } from '../../../../../utils/helpers';
Expand Down Expand Up @@ -166,7 +166,7 @@ const s3DatasetTestSuite = () => {
// Need to wait a bit for initial query to start
cy.wait(3000);

cy.intercept('DELETE', `**/${DELETE_API}*`).as('cancelRequest');
cy.intercept('DELETE', `**/${JOBS_API.DELETE}*`).as('cancelRequest');
cy.getElementByTestId(`querySubmitButton`).click();

cy.wait('@cancelRequest').then((interception) => {
Expand Down
5 changes: 4 additions & 1 deletion cypress/utils/apps/query_enhancements/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export const DS_API = {
};
export const DSM_API = '/internal/data-source-management/fetchDataSourceMetaData';

export const DELETE_API = '/api/enhancements/jobs';
export const BASE_QUERY_ENHANCEMENTS_API = '/api/enhancements';
export const JOBS_API = {
DELETE: `${BASE_QUERY_ENHANCEMENTS_API}/jobs`,
};

export const INDEX_WITH_TIME_1 = 'data_logs_small_time_1';
export const INDEX_WITHOUT_TIME_1 = 'data_logs_small_no_time_1';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function registerDataSourceConnectionsRoutes(

router.delete(

Check warning on line 103 in src/plugins/query_enhancements/server/routes/data_source_connection/routes.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/query_enhancements/server/routes/data_source_connection/routes.ts#L103

Added line #L103 was not covered by tests
{
path: `${API.DATA_SOURCE.ASYNC_JOBS}`,
path: API.DATA_SOURCE.ASYNC_JOBS,
validate: {
query: schema.object({
id: schema.string(),
Expand Down

0 comments on commit 6b8e830

Please sign in to comment.