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

testing for datalakestore & datalakeanalytics #2511

Merged
merged 2 commits into from
Oct 12, 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
@@ -0,0 +1,48 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.datalakeanalytics.v2016_11_01;
import com.microsoft.azure.arm.core.TestBase;
import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.implementation.DataLakeAnalyticsManager;
import com.microsoft.azure.management.resources.implementation.ResourceManager;
import com.microsoft.rest.RestClient;
import com.microsoft.azure.arm.utils.SdkContext;
import org.junit.Test;
import org.junit.Assert;
import com.microsoft.azure.arm.resources.Region;
import com.microsoft.azure.management.resources.ResourceGroup;

public class DataLakeAnalyticsTest extends TestBase {
protected static ResourceManager resourceManager;
protected static DataLakeAnalyticsManager dataLakeAnalyticsManager;
private static String rgName;

@Override
protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) {
resourceManager = ResourceManager
.authenticate(restClient)
.withSubscription(defaultSubscription);
dataLakeAnalyticsManager = DataLakeAnalyticsManager
.authenticate(restClient, defaultSubscription);
}

@Override
protected void cleanUpResources() {
resourceManager.resourceGroups().deleteByName(rgName);
}

@Test
public void firstTest() {
rgName = SdkContext.randomResourceName("rg", 20);
ResourceGroup group = resourceManager.resourceGroups()
.define(rgName)
.withRegion(Region.US_WEST.toString())
.create();
Assert.assertNotNull(group);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
"Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg64f0485289a8e?api-version=2017-05-10",
"Headers" : {
"User-Agent" : "Azure-SDK-For-Java/1.14.0 OS:Windows Server 2016/10.0 MacAddressHash:0371b9e37b1296dd4f18ab8d1d04ef835872ef528a05f8ea79f7b735a5603490 Java:1.8.0_181 (ResourceManagementClient, 2017-05-10)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
"date" : "Wed, 10 Oct 2018 01:52:26 GMT",
"content-length" : "183",
"expires" : "-1",
"x-ms-ratelimit-remaining-subscription-writes" : "1199",
"retry-after" : "0",
"StatusCode" : "201",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000; includeSubDomains",
"x-ms-correlation-request-id" : "64bfe462-c74c-47db-b974-bd49f14124a5",
"x-content-type-options" : "nosniff",
"x-ms-routing-request-id" : "WESTUS2:20181010T015227Z:64bfe462-c74c-47db-b974-bd49f14124a5",
"content-type" : "application/json; charset=utf-8",
"cache-control" : "no-cache",
"x-ms-request-id" : "64bfe462-c74c-47db-b974-bd49f14124a5",
"Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg64f0485289a8e\",\"name\":\"rg64f0485289a8e\",\"location\":\"westus\",\"properties\":{\"provisioningState\":\"Succeeded\"}}"
}
}, {
"Method" : "DELETE",
"Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg64f0485289a8e?api-version=2017-05-10",
"Headers" : {
"User-Agent" : "Azure-SDK-For-Java/1.14.0 OS:Windows Server 2016/10.0 MacAddressHash:0371b9e37b1296dd4f18ab8d1d04ef835872ef528a05f8ea79f7b735a5603490 Java:1.8.0_181 (ResourceManagementClient, 2017-05-10)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
"date" : "Wed, 10 Oct 2018 01:52:27 GMT",
"content-length" : "0",
"expires" : "-1",
"x-ms-ratelimit-remaining-subscription-deletes" : "14999",
"retry-after" : "0",
"StatusCode" : "202",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000; includeSubDomains",
"x-ms-correlation-request-id" : "9be3ece7-940a-416c-a0ed-3aaf14c0298d",
"x-content-type-options" : "nosniff",
"x-ms-routing-request-id" : "WESTUS2:20181010T015227Z:9be3ece7-940a-416c-a0ed-3aaf14c0298d",
"location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzY0RjA0ODUyODlBOEUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10",
"cache-control" : "no-cache",
"x-ms-request-id" : "9be3ece7-940a-416c-a0ed-3aaf14c0298d",
"Body" : ""
}
}, {
"Method" : "GET",
"Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzY0RjA0ODUyODlBOEUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10",
"Headers" : {
"User-Agent" : "Azure-SDK-For-Java/1.14.0 OS:Windows Server 2016/10.0 MacAddressHash:0371b9e37b1296dd4f18ab8d1d04ef835872ef528a05f8ea79f7b735a5603490 Java:1.8.0_181 (ResourceManagementClient, 2017-05-10)"
},
"Response" : {
"date" : "Wed, 10 Oct 2018 01:52:27 GMT",
"content-length" : "0",
"expires" : "-1",
"retry-after" : "0",
"x-ms-ratelimit-remaining-subscription-reads" : "11999",
"StatusCode" : "202",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000; includeSubDomains",
"x-ms-correlation-request-id" : "288ccc06-f3a8-4ccc-9ead-96c8b1240790",
"x-content-type-options" : "nosniff",
"x-ms-routing-request-id" : "WESTUS2:20181010T015227Z:288ccc06-f3a8-4ccc-9ead-96c8b1240790",
"location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzY0RjA0ODUyODlBOEUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10",
"cache-control" : "no-cache",
"x-ms-request-id" : "288ccc06-f3a8-4ccc-9ead-96c8b1240790",
"Body" : ""
}
}, {
"Method" : "GET",
"Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzY0RjA0ODUyODlBOEUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10",
"Headers" : {
"User-Agent" : "Azure-SDK-For-Java/1.14.0 OS:Windows Server 2016/10.0 MacAddressHash:0371b9e37b1296dd4f18ab8d1d04ef835872ef528a05f8ea79f7b735a5603490 Java:1.8.0_181 (ResourceManagementClient, 2017-05-10)"
},
"Response" : {
"date" : "Wed, 10 Oct 2018 01:52:41 GMT",
"content-length" : "0",
"expires" : "-1",
"retry-after" : "0",
"x-ms-ratelimit-remaining-subscription-reads" : "11998",
"StatusCode" : "202",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000; includeSubDomains",
"x-ms-correlation-request-id" : "1904983b-cbef-4010-8bef-ec13e93070ac",
"x-content-type-options" : "nosniff",
"x-ms-routing-request-id" : "WESTUS2:20181010T015242Z:1904983b-cbef-4010-8bef-ec13e93070ac",
"location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzY0RjA0ODUyODlBOEUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10",
"cache-control" : "no-cache",
"x-ms-request-id" : "1904983b-cbef-4010-8bef-ec13e93070ac",
"Body" : ""
}
}, {
"Method" : "GET",
"Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzY0RjA0ODUyODlBOEUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10",
"Headers" : {
"User-Agent" : "Azure-SDK-For-Java/1.14.0 OS:Windows Server 2016/10.0 MacAddressHash:0371b9e37b1296dd4f18ab8d1d04ef835872ef528a05f8ea79f7b735a5603490 Java:1.8.0_181 (ResourceManagementClient, 2017-05-10)"
},
"Response" : {
"date" : "Wed, 10 Oct 2018 01:52:57 GMT",
"content-length" : "0",
"expires" : "-1",
"retry-after" : "0",
"x-ms-ratelimit-remaining-subscription-reads" : "11997",
"StatusCode" : "202",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000; includeSubDomains",
"x-ms-correlation-request-id" : "068a6fa8-b16c-4aba-8e8d-f68fdccbd174",
"x-content-type-options" : "nosniff",
"x-ms-routing-request-id" : "WESTUS2:20181010T015257Z:068a6fa8-b16c-4aba-8e8d-f68fdccbd174",
"location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzY0RjA0ODUyODlBOEUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10",
"cache-control" : "no-cache",
"x-ms-request-id" : "068a6fa8-b16c-4aba-8e8d-f68fdccbd174",
"Body" : ""
}
}, {
"Method" : "GET",
"Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzY0RjA0ODUyODlBOEUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2017-05-10",
"Headers" : {
"User-Agent" : "Azure-SDK-For-Java/1.14.0 OS:Windows Server 2016/10.0 MacAddressHash:0371b9e37b1296dd4f18ab8d1d04ef835872ef528a05f8ea79f7b735a5603490 Java:1.8.0_181 (ResourceManagementClient, 2017-05-10)"
},
"Response" : {
"date" : "Wed, 10 Oct 2018 01:53:12 GMT",
"content-length" : "0",
"expires" : "-1",
"retry-after" : "0",
"x-ms-ratelimit-remaining-subscription-reads" : "11996",
"StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000; includeSubDomains",
"x-ms-correlation-request-id" : "59df9fef-858e-4b7e-a4e7-f6d7a4706bf2",
"x-content-type-options" : "nosniff",
"x-ms-routing-request-id" : "WESTUS2:20181010T015312Z:59df9fef-858e-4b7e-a4e7-f6d7a4706bf2",
"cache-control" : "no-cache",
"x-ms-request-id" : "59df9fef-858e-4b7e-a4e7-f6d7a4706bf2",
"Body" : ""
}
} ],
"variables" : [ "rg64f0485289a8e" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.datalakestore.v2016_11_01;
import com.microsoft.azure.arm.core.TestBase;
import com.microsoft.azure.management.datalakestore.v2016_11_01.implementation.DataLakeStoreManager;
import com.microsoft.azure.management.resources.implementation.ResourceManager;
import com.microsoft.rest.RestClient;
import com.microsoft.azure.arm.utils.SdkContext;
import org.junit.Test;
import org.junit.Assert;
import com.microsoft.azure.arm.resources.Region;
import com.microsoft.azure.management.resources.ResourceGroup;

public class DataLakeStoreTest extends TestBase {
protected static ResourceManager resourceManager;
protected static DataLakeStoreManager dataLakeStoreManager;
private static String rgName;

@Override
protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) {
resourceManager = ResourceManager
.authenticate(restClient)
.withSubscription(defaultSubscription);
dataLakeStoreManager = DataLakeStoreManager
.authenticate(restClient, defaultSubscription);
}

@Override
protected void cleanUpResources() {
resourceManager.resourceGroups().deleteByName(rgName);
}

@Test
public void firstTest() {
rgName = SdkContext.randomResourceName("rg", 20);
ResourceGroup group = resourceManager.resourceGroups()
.define(rgName)
.withRegion(Region.US_WEST.toString())
.create();
Assert.assertNotNull(group);
}
}
Loading