mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-17 09:35:37 -05:00
simplify drop object request handler (#1953)
* simplify drop object request handler * fix test cases * fix issues * update strings * fix error * fix error
This commit is contained in:
@@ -30,13 +30,13 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Security
|
||||
var connectionResult = await LiveConnectionHelper.InitLiveConnectionInfoAsync("master", queryTempFile.FilePath);
|
||||
var service = new SecurityService();
|
||||
var credential = SecurityTestUtils.GetTestCredentialInfo();
|
||||
await SecurityTestUtils.DeleteCredential(service, connectionResult, credential);
|
||||
await SecurityTestUtils.DropObject(connectionResult.ConnectionInfo.OwnerUri, SecurityTestUtils.GetCredentialURN(credential.Name));
|
||||
|
||||
// test
|
||||
await SecurityTestUtils.CreateCredential(service, connectionResult, credential);
|
||||
|
||||
// cleanup
|
||||
await SecurityTestUtils.DeleteCredential(service, connectionResult, credential);
|
||||
await SecurityTestUtils.DropObject(connectionResult.ConnectionInfo.OwnerUri, SecurityTestUtils.GetCredentialURN(credential.Name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,14 +52,14 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Security
|
||||
var connectionResult = await LiveConnectionHelper.InitLiveConnectionInfoAsync("master", queryTempFile.FilePath);
|
||||
var service = new SecurityService();
|
||||
var credential = SecurityTestUtils.GetTestCredentialInfo();
|
||||
await SecurityTestUtils.DeleteCredential(service, connectionResult, credential);
|
||||
await SecurityTestUtils.DropObject(connectionResult.ConnectionInfo.OwnerUri, SecurityTestUtils.GetCredentialURN(credential.Name));
|
||||
await SecurityTestUtils.CreateCredential(service, connectionResult, credential);
|
||||
|
||||
// test
|
||||
await SecurityTestUtils.UpdateCredential(service, connectionResult, credential);
|
||||
|
||||
// cleanup
|
||||
await SecurityTestUtils.DeleteCredential(service, connectionResult, credential);
|
||||
await SecurityTestUtils.DropObject(connectionResult.ConnectionInfo.OwnerUri, SecurityTestUtils.GetCredentialURN(credential.Name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,11 +75,11 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Security
|
||||
var connectionResult = await LiveConnectionHelper.InitLiveConnectionInfoAsync("master", queryTempFile.FilePath);
|
||||
var service = new SecurityService();
|
||||
var credential = SecurityTestUtils.GetTestCredentialInfo();
|
||||
await SecurityTestUtils.DeleteCredential(service, connectionResult, credential);
|
||||
await SecurityTestUtils.DropObject(connectionResult.ConnectionInfo.OwnerUri, SecurityTestUtils.GetCredentialURN(credential.Name));
|
||||
await SecurityTestUtils.CreateCredential(service, connectionResult, credential);
|
||||
|
||||
// test
|
||||
await SecurityTestUtils.DeleteCredential(service, connectionResult, credential);
|
||||
await SecurityTestUtils.DropObject(connectionResult.ConnectionInfo.OwnerUri, SecurityTestUtils.GetCredentialURN(credential.Name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user