Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ba60208
Initial progress on the setup
Aug 9, 2022
fcb9e41
Find tests working for all 3 dbs
Aug 10, 2022
200ef92
Put tests working
Aug 10, 2022
bb42bf4
Patch,delete tests working
Aug 10, 2022
b9f8255
Fixing unique character InsertRestApiTest
Aug 12, 2022
4d8b887
Merge remote-tracking branch 'origin/main' into dev/agarwalayush/Rest…
Aug 16, 2022
ed41fd5
Using unsaferelaxedjsonescaping
Aug 16, 2022
8144a75
Fixed INSERT test cases
Aug 17, 2022
e106f9b
Removing restcontroller's use
Aug 17, 2022
0b74a8c
Fixing insertrequestcontext unit test
Aug 17, 2022
5f41fbf
Formatting fixes
Aug 17, 2022
0225826
Code refactoring, clean up and comments/summary
Aug 17, 2022
6ebe23c
Comment for clarity
Aug 17, 2022
c0f530c
One insert test still to fix
Aug 18, 2022
5c37204
Correcting indentation
Aug 18, 2022
4c924f5
All tests fixed
Aug 18, 2022
c27280a
Removing unused code
Aug 19, 2022
6ba3d6d
Removing unused class members
Aug 19, 2022
744a838
Formatting fix
Aug 19, 2022
61ba885
Merge branch 'main' into dev/agarwalayush/RestTestPipeline
ayush3797 Aug 22, 2022
57f4468
Code clean up
Aug 22, 2022
0f0b7ff
Merge branch 'dev/agarwalayush/RestTestPipeline' of https://github.co…
Aug 22, 2022
6e87e8b
Fixing assertions
Aug 22, 2022
baf3e9e
Removing unused method
Aug 22, 2022
c7d9580
Renaming variables
Aug 22, 2022
ef2de17
Removing redundant code
Aug 22, 2022
2f96bf0
Comment for actualLocation evaluation
Aug 22, 2022
d99f05a
Merge with main
Aug 22, 2022
9b3f0bf
Fixing procedure tests
Aug 22, 2022
2156aa3
Adding permission for anonymous role
Aug 22, 2022
3517df6
Adding comment for escaping
Aug 22, 2022
131c088
Correcting comment
Aug 23, 2022
deb3444
Changing variable name
Aug 23, 2022
e1c20f9
Reverting temporary changes
Aug 23, 2022
fb83f3a
Resolving conflicts with main
Aug 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ await SetupAndRunRestApiTest(
queryString: null,
entity: _integrationEntityName,
sqlQuery: null,
controller: _restController,
operationType: Operation.Delete,
requestBody: null,
expectedStatusCode: HttpStatusCode.NoContent
Expand All @@ -55,7 +54,6 @@ await SetupAndRunRestApiTest(
queryString: null,
entity: _integrationMappingEntity,
sqlQuery: null,
controller: _restController,
operationType: Operation.Delete,
requestBody: null,
expectedStatusCode: HttpStatusCode.NoContent
Expand All @@ -80,7 +78,6 @@ await SetupAndRunRestApiTest(
queryString: null,
entity: _integrationUniqueCharactersEntity,
sqlQuery: null,
controller: _restController,
operationType: Operation.Delete,
requestBody: null,
expectedStatusCode: HttpStatusCode.NoContent
Expand All @@ -105,10 +102,9 @@ await SetupAndRunRestApiTest(
queryString: string.Empty,
entity: _integrationEntityName,
sqlQuery: string.Empty,
controller: _restController,
operationType: Operation.Delete,
requestBody: string.Empty,
exception: true,
exceptionExpected: true,
expectedErrorMessage: "Not Found",
expectedStatusCode: HttpStatusCode.NotFound,
expectedSubStatusCode: DataApiBuilderException.SubStatusCodes.EntityNotFound.ToString()
Expand All @@ -130,10 +126,9 @@ await SetupAndRunRestApiTest(
queryString: string.Empty,
entity: _integrationEntityName,
sqlQuery: string.Empty,
controller: _restController,
operationType: Operation.Delete,
requestBody: string.Empty,
exception: true,
exceptionExpected: true,
expectedErrorMessage: "The request is invalid since the primary keys: title requested were not found in the entity definition.",
expectedStatusCode: HttpStatusCode.NotFound,
expectedSubStatusCode: DataApiBuilderException.SubStatusCodes.EntityNotFound.ToString()
Expand All @@ -154,10 +149,9 @@ await SetupAndRunRestApiTest(
queryString: string.Empty,
entity: _integrationEntityName,
sqlQuery: string.Empty,
controller: _restController,
operationType: Operation.Delete,
requestBody: string.Empty,
exception: true,
exceptionExpected: true,
expectedErrorMessage: "Primary Key for DELETE requests is required.",
expectedStatusCode: HttpStatusCode.BadRequest,
expectedSubStatusCode: DataApiBuilderException.SubStatusCodes.BadRequest.ToString()
Expand Down Expand Up @@ -186,10 +180,9 @@ await SetupAndRunRestApiTest(
queryString: string.Empty,
entity: _integrationEntityName,
sqlQuery: string.Empty,
controller: _restController,
operationType: Operation.Delete,
requestBody: string.Empty,
exception: true,
exceptionExpected: true,
expectedErrorMessage: message,
expectedStatusCode: HttpStatusCode.BadRequest,
expectedSubStatusCode: DataApiBuilderException.SubStatusCodes.BadRequest.ToString()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.DataApiBuilder.Service.Controllers;
using Azure.DataApiBuilder.Service.Services;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Azure.DataApiBuilder.Service.Tests.SqlTests.RestApiTests.Delete
Expand Down Expand Up @@ -34,16 +32,6 @@ public static async Task SetupAsync(TestContext context)
{
DatabaseEngine = TestCategory.MSSQL;
await InitializeTestFixture(context);
// Setup REST Components
_restService = new RestService(_queryEngine,
_mutationEngine,
_sqlMetadataProvider,
_httpContextAccessor.Object,
_authorizationService.Object,
_authorizationResolver,
_runtimeConfigProvider);
_restController = new RestController(_restService,
_restControllerLogger);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.DataApiBuilder.Service.Controllers;
using Azure.DataApiBuilder.Service.Services;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Azure.DataApiBuilder.Service.Tests.SqlTests.RestApiTests.Delete
Expand Down Expand Up @@ -36,15 +34,6 @@ public static async Task SetupAsync(TestContext context)
{
DatabaseEngine = TestCategory.MYSQL;
await InitializeTestFixture(context);
_restService = new RestService(_queryEngine,
_mutationEngine,
_sqlMetadataProvider,
_httpContextAccessor.Object,
_authorizationService.Object,
_authorizationResolver,
_runtimeConfigProvider);
_restController = new RestController(_restService,
_restControllerLogger);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.DataApiBuilder.Service.Controllers;
using Azure.DataApiBuilder.Service.Services;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Azure.DataApiBuilder.Service.Tests.SqlTests.RestApiTests.Delete
Expand Down Expand Up @@ -36,15 +34,6 @@ public static async Task SetupAsync(TestContext context)
{
DatabaseEngine = TestCategory.POSTGRESQL;
await InitializeTestFixture(context);
_restService = new RestService(_queryEngine,
_mutationEngine,
_sqlMetadataProvider,
_httpContextAccessor.Object,
_authorizationService.Object,
_authorizationResolver,
_runtimeConfigProvider);
_restController = new RestController(_restService,
_restControllerLogger);
}

#endregion
Expand Down
Loading