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

Fix ApiRevisionId and other test fixes #4120

Merged
merged 2 commits into from
Mar 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -166,7 +166,7 @@ public async Task WsdlTest()
Path = path,
ContentFormat = ContentFormat.Wsdl,
ContentValue = wsdlApiContent,
SoapApiType = SoapApiType.Soap, // create Soap Pass through API
SoapApiType = SoapApiType.SoapPassThrough, // create Soap Pass through API
WsdlSelector = new ApiCreateOrUpdatePropertiesWsdlSelector()
{
WsdlServiceName = "Weather",
Expand All @@ -181,7 +181,7 @@ public async Task WsdlTest()
apiCreateOrUpdate);

Assert.NotNull(wsdlApiResponse);
Assert.Equal(SoapApiType.Soap, wsdlApiResponse.ApiType);
Assert.Equal(SoapApiType.SoapPassThrough, wsdlApiResponse.ApiType);

// get the api to check it was created
var apiContract = testBase.client.Api.Get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async Task CreateListUpdateDeleteEventHub()
string newloggerId = TestUtilities.GenerateName("newlogger");
string eventHubNameSpaceName = TestUtilities.GenerateName("eventHubNamespace");
string eventHubName = TestUtilities.GenerateName("eventhubname");

try
{
// first create the event hub namespace
Expand Down Expand Up @@ -131,6 +131,7 @@ public async Task CreateListUpdateDeleteEventHub()
Assert.Equal(newloggerId, loggerContract.Name);
Assert.Equal(patchedDescription, loggerContract.Description);
Assert.NotNull(loggerContract.Credentials);
Assert.NotNull(loggerContract.CredentialsPropertyName);

// get the logger tag
loggerTag = await testBase.client.Logger.GetEntityTagAsync(
Expand Down Expand Up @@ -161,6 +162,18 @@ public async Task CreateListUpdateDeleteEventHub()
finally
{
testBase.client.Logger.Delete(testBase.rgName, testBase.serviceName, newloggerId, "*");
// clean up all properties
var listOfProperties = testBase.client.Property.ListByService(
testBase.rgName,
testBase.serviceName);
foreach (var property in listOfProperties)
{
testBase.client.Property.Delete(
testBase.rgName,
testBase.serviceName,
property.Name,
"*");
}
testBase.eventHubClient.EventHubs.Delete(testBase.rgName, eventHubNameSpaceName, eventHubName);
testBase.eventHubClient.Namespaces.Delete(testBase.rgName, eventHubNameSpaceName);
}
Expand All @@ -177,7 +190,7 @@ public async Task CreateListUpdateDeleteApplicationInsights()
testBase.TryCreateApiManagementService();

string newloggerId = TestUtilities.GenerateName("applicationInsight");

try
{
// now create logger using the event
Expand Down Expand Up @@ -241,6 +254,7 @@ public async Task CreateListUpdateDeleteApplicationInsights()
Assert.Equal(newloggerId, loggerContract.Name);
Assert.Equal(patchedDescription, loggerContract.Description);
Assert.NotNull(loggerContract.Credentials);
Assert.NotNull(loggerContract.CredentialsPropertyName);

// get the logger tag
loggerTag = await testBase.client.Logger.GetEntityTagAsync(
Expand Down Expand Up @@ -270,7 +284,19 @@ public async Task CreateListUpdateDeleteApplicationInsights()
}
finally
{
testBase.client.Logger.Delete(testBase.rgName, testBase.serviceName, newloggerId, "*");
testBase.client.Logger.Delete(testBase.rgName, testBase.serviceName, newloggerId, "*");
var listOfProperties = testBase.client.Property.ListByService(
testBase.rgName,
testBase.serviceName);

foreach (var property in listOfProperties)
{
testBase.client.Property.Delete(
testBase.rgName,
testBase.serviceName,
property.Name,
"*");
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public async Task CreateListUpdateDelete()
Assert.True(Uri.TryCreate(genrateSsoResponse.Value, UriKind.Absolute, out uri));

// generate token for user
var userTokenParameters = new UserTokenParameters(KeyType.Primary, DateTime.UtcNow.AddDays(30));
var userTokenParameters = new UserTokenParameters(KeyType.Primary, DateTime.UtcNow.AddDays(10));
var genrateTokenResponse = testBase.client.User.GetSharedAccessToken(
testBase.rgName,
testBase.serviceName,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"289"
],
"x-ms-client-request-id": [
"00b86be4-4308-432f-9e01-9bcb48c7b1bc"
"b2d5f680-3cf0-4c01-b8a6-b0d8ddf4fac9"
],
"accept-language": [
"en-US"
Expand All @@ -35,7 +35,7 @@
"no-cache"
],
"Date": [
"Thu, 08 Mar 2018 21:13:02 GMT"
"Fri, 09 Mar 2018 19:56:19 GMT"
],
"Pragma": [
"no-cache"
Expand All @@ -56,17 +56,17 @@
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"298bdaad-4516-4995-bd71-d014aafdd44c",
"e89dd310-01e0-4e48-b922-f6ada9ae447d"
"16aab084-2974-4a40-b5fc-0c492366c362",
"4196a74b-20a2-4b42-8487-5c465cce1e7f"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1199"
],
"x-ms-correlation-request-id": [
"3cf47d83-a2d3-46e3-a408-a5eee697b122"
"189ab5af-12cf-466c-9eaa-794ac5c0a4c6"
],
"x-ms-routing-request-id": [
"WESTUS2:20180308T211303Z:3cf47d83-a2d3-46e3-a408-a5eee697b122"
"WESTUS2:20180309T195619Z:189ab5af-12cf-466c-9eaa-794ac5c0a4c6"
],
"X-Content-Type-Options": [
"nosniff"
Expand All @@ -81,7 +81,7 @@
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"32bcf591-0e32-4219-b9bb-89c9456d97d8"
"56c8a95e-5e6a-4373-843e-c38c63eef456"
],
"accept-language": [
"en-US"
Expand All @@ -103,7 +103,7 @@
"no-cache"
],
"Date": [
"Thu, 08 Mar 2018 21:13:03 GMT"
"Fri, 09 Mar 2018 19:56:19 GMT"
],
"Pragma": [
"no-cache"
Expand All @@ -124,16 +124,16 @@
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"7006df87-f7d3-411e-bb79-8f1eb694523b"
"34a04769-0a03-43ee-acbe-228424cacbde"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14999"
"14992"
],
"x-ms-correlation-request-id": [
"46184c45-12dd-4c66-b239-36d92b8e88df"
"60322f22-93f2-4192-aeec-027c9a349b3a"
],
"x-ms-routing-request-id": [
"WESTUS2:20180308T211303Z:46184c45-12dd-4c66-b239-36d92b8e88df"
"WESTUS2:20180309T195619Z:60322f22-93f2-4192-aeec-027c9a349b3a"
],
"X-Content-Type-Options": [
"nosniff"
Expand All @@ -148,7 +148,7 @@
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"40c94b86-46c6-48b9-9377-83ee3385ca61"
"97c88996-c411-49f0-a866-62945abbe116"
],
"accept-language": [
"en-US"
Expand All @@ -170,7 +170,7 @@
"no-cache"
],
"Date": [
"Thu, 08 Mar 2018 21:13:03 GMT"
"Fri, 09 Mar 2018 19:56:19 GMT"
],
"Pragma": [
"no-cache"
Expand All @@ -188,16 +188,16 @@
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"d42889e5-ce78-40b3-9f87-9bf5c9d92527"
"63de3677-2eca-4260-9a76-7b19f0d40df4"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14998"
"14991"
],
"x-ms-correlation-request-id": [
"46953f4f-7940-4001-bfa3-97f9b764d74e"
"72f711e7-5d0e-4b71-bc41-c5bc30a45b7a"
],
"x-ms-routing-request-id": [
"WESTUS2:20180308T211304Z:46953f4f-7940-4001-bfa3-97f9b764d74e"
"WESTUS2:20180309T195619Z:72f711e7-5d0e-4b71-bc41-c5bc30a45b7a"
],
"X-Content-Type-Options": [
"nosniff"
Expand All @@ -212,7 +212,7 @@
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"7b019b98-e325-4f15-8f59-958a4ed21593"
"edcc442d-bedd-403e-8335-6185263f91ad"
],
"accept-language": [
"en-US"
Expand All @@ -234,7 +234,7 @@
"no-cache"
],
"Date": [
"Thu, 08 Mar 2018 21:13:03 GMT"
"Fri, 09 Mar 2018 19:56:19 GMT"
],
"Pragma": [
"no-cache"
Expand All @@ -252,16 +252,16 @@
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"54f48179-d2d6-4bc5-8c5e-0096718a4bbe"
"142da5ca-30c7-40bf-b482-fd831beb1fff"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14997"
"14990"
],
"x-ms-correlation-request-id": [
"af9e1c77-9573-4797-80e4-1299a2ef1194"
"e11674d3-5099-44ba-b376-2a1f357a0a6e"
],
"x-ms-routing-request-id": [
"WESTUS2:20180308T211304Z:af9e1c77-9573-4797-80e4-1299a2ef1194"
"WESTUS2:20180309T195619Z:e11674d3-5099-44ba-b376-2a1f357a0a6e"
],
"X-Content-Type-Options": [
"nosniff"
Expand All @@ -276,7 +276,7 @@
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"1ecad98d-fba0-4923-9896-dd9d873b1794"
"64e78dde-e2c8-4301-aac7-22819d8e20b0"
],
"accept-language": [
"en-US"
Expand All @@ -298,7 +298,7 @@
"no-cache"
],
"Date": [
"Thu, 08 Mar 2018 21:13:03 GMT"
"Fri, 09 Mar 2018 19:56:19 GMT"
],
"Pragma": [
"no-cache"
Expand All @@ -316,16 +316,16 @@
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"5254d1f5-31d7-41f1-88be-6284b395a210"
"97ce4a50-97a8-43a4-920c-0ec4c20ca96b"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14996"
"14989"
],
"x-ms-correlation-request-id": [
"c70e0b0a-ec0e-4691-8fb3-9edfd61c878b"
"78e35397-c24d-4bd2-8e34-0baa0350fcd9"
],
"x-ms-routing-request-id": [
"WESTUS2:20180308T211304Z:c70e0b0a-ec0e-4691-8fb3-9edfd61c878b"
"WESTUS2:20180309T195620Z:78e35397-c24d-4bd2-8e34-0baa0350fcd9"
],
"X-Content-Type-Options": [
"nosniff"
Expand All @@ -340,7 +340,7 @@
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"64fecb9f-ebb7-4780-9610-b2dc322a0cae"
"7ba3324f-aaed-4bd2-a418-fdc02689630a"
],
"accept-language": [
"en-US"
Expand All @@ -362,7 +362,7 @@
"no-cache"
],
"Date": [
"Thu, 08 Mar 2018 21:13:03 GMT"
"Fri, 09 Mar 2018 19:56:20 GMT"
],
"Pragma": [
"no-cache"
Expand All @@ -380,16 +380,16 @@
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"61028667-c6a1-475c-a405-0a0a582b1204"
"bb20d879-4b7a-4048-888f-d83a6d5b5cdb"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14995"
"14988"
],
"x-ms-correlation-request-id": [
"ea18ab1a-f610-4684-80cd-9fb355d3039d"
"79298f23-38c7-4d96-a1a2-f2222c1d6640"
],
"x-ms-routing-request-id": [
"WESTUS2:20180308T211304Z:ea18ab1a-f610-4684-80cd-9fb355d3039d"
"WESTUS2:20180309T195620Z:79298f23-38c7-4d96-a1a2-f2222c1d6640"
],
"X-Content-Type-Options": [
"nosniff"
Expand All @@ -404,7 +404,7 @@
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"1ec0149b-a38a-4af8-9057-f772ffb81446"
"94a9e918-5bca-40fd-be1f-45e120710f7b"
],
"accept-language": [
"en-US"
Expand All @@ -426,7 +426,7 @@
"no-cache"
],
"Date": [
"Thu, 08 Mar 2018 21:13:03 GMT"
"Fri, 09 Mar 2018 19:56:20 GMT"
],
"Pragma": [
"no-cache"
Expand All @@ -444,16 +444,16 @@
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"edbbcaaa-2460-4086-bb4b-241407502124"
"c62706ad-d4ae-44ea-808c-4acf1d46add3"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14994"
"14987"
],
"x-ms-correlation-request-id": [
"2b031edb-c3da-42bc-bb44-1db1cc9528ed"
"82bacd22-34df-4910-b26f-1c40fad57f32"
],
"x-ms-routing-request-id": [
"WESTUS2:20180308T211304Z:2b031edb-c3da-42bc-bb44-1db1cc9528ed"
"WESTUS2:20180309T195620Z:82bacd22-34df-4910-b26f-1c40fad57f32"
],
"X-Content-Type-Options": [
"nosniff"
Expand Down
Loading