Update Agent contracts to match SQL Ops definitons (#633)

* WIP 2

* Update contracts to match SQL Ops definitons
This commit is contained in:
Karl Burtram
2018-06-11 16:32:46 -07:00
committed by GitHub
parent 372ca0cbe8
commit 7c1f78a678
12 changed files with 139 additions and 559 deletions

View File

@@ -19,6 +19,7 @@ using Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility;
using Microsoft.SqlTools.ServiceLayer.Profiler;
using Microsoft.SqlTools.ServiceLayer.Profiler.Contracts;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
using Microsoft.SqlTools.ServiceLayer.Utility;
using Moq;
using Xunit;
@@ -102,7 +103,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Agent
{
var createContext = new Mock<RequestContext<CreateAgentAlertResult>>();
var updateContext = new Mock<RequestContext<UpdateAgentAlertResult>>();
var deleteContext = new Mock<RequestContext<DeleteAgentAlertResult>>();
var deleteContext = new Mock<RequestContext<ResultStatus>>();
var service = new AgentService();
var alert = new AgentAlertInfo()

View File

@@ -9,6 +9,7 @@ using Microsoft.SqlTools.ServiceLayer.Agent;
using Microsoft.SqlTools.ServiceLayer.Agent.Contracts;
using Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
using Microsoft.SqlTools.ServiceLayer.Utility;
using Moq;
using Xunit;
@@ -26,7 +27,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Agent
{
var createContext = new Mock<RequestContext<CreateAgentProxyResult>>();
var updateContext = new Mock<RequestContext<UpdateAgentProxyResult>>();
var deleteContext = new Mock<RequestContext<DeleteAgentProxyResult>>();
var deleteContext = new Mock<RequestContext<ResultStatus>>();
var service = new AgentService();
var proxy = new AgentProxyInfo()

View File

@@ -3,22 +3,14 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.XEvent;
using Microsoft.SqlTools.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.Agent;
using Microsoft.SqlTools.ServiceLayer.Agent.Contracts;
using Microsoft.SqlTools.ServiceLayer.Connection;
using Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility;
using Microsoft.SqlTools.ServiceLayer.Profiler;
using Microsoft.SqlTools.ServiceLayer.Profiler.Contracts;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
using Microsoft.SqlTools.ServiceLayer.Utility;
using Moq;
using Xunit;
@@ -86,7 +78,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Agent
JobName = "Agent history clean up: distribution"
};
var requestContext = new Mock<RequestContext<AgentJobActionResult>>();
var requestContext = new Mock<RequestContext<ResultStatus>>();
AgentService service = new AgentService();
await service.HandleJobActionRequest(requestParams, requestContext.Object);
@@ -94,4 +86,4 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Agent
}
}
}
}
}