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

Add DataLakeAnalyticsTestRunner and replace AdlaTestsBase #18090

Merged
merged 2 commits into from
May 10, 2022
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 @@ -15,61 +15,49 @@
namespace Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests
{
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using ServiceManagement.Common.Models;
using Xunit;

public class AdlaAliasTests : AdlaTestsBase
public class AdlaAliasTests : DataLakeAnalyticsTestRunner
{
public XunitTracingInterceptor _logger;

public AdlaAliasTests(Xunit.Abstractions.ITestOutputHelper output)
internal const string ResourceGroupLocation = "eastus2";
public AdlaAliasTests(Xunit.Abstractions.ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact(Skip = "Updated Storage client, test needs rerecorded")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaAccount()
{
AdlaTestsBase.NewInstance.RunPsTest(true,
_logger,
string.Format(
"Test-DataLakeAnalyticsAccount -blobAccountKey -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsAccount -blobAccountKey -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaAccountTiers()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsAccountTiers -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsAccountTiers -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaFirewallRules()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsFirewall -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsFirewall -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaComputePolicy()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsComputePolicy -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsComputePolicy -location '{0}'",
ResourceGroupLocation));
}

#if NETSTANDARD
Expand All @@ -80,55 +68,45 @@ public void TestAdlaComputePolicy()
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaCatalog()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsCatalog -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsCatalog -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaJob()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsJob -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsJob -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaJobRelationships()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsJobRelationships -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsJobRelationships -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNegativeAdlaAccount()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-NegativeDataLakeAnalyticsAccount -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-NegativeDataLakeAnalyticsAccount -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNegativeAdlaJob()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-NegativeDataLakeAnalyticsJob -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-NegativeDataLakeAnalyticsJob -location '{0}'",
ResourceGroupLocation));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,49 @@
namespace Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests
{
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using ServiceManagement.Common.Models;
using Xunit;

public class AdlaTests : AdlaTestsBase
public class AdlaTests : DataLakeAnalyticsTestRunner
{
public XunitTracingInterceptor _logger;

public AdlaTests(Xunit.Abstractions.ITestOutputHelper output)
internal const string ResourceGroupLocation = "eastus2";
public AdlaTests(Xunit.Abstractions.ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact(Skip = "Updated Storage client, test needs rerecorded")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaAccount()
{
AdlaTestsBase.NewInstance.RunPsTest(true,
_logger,
string.Format(
"Test-DataLakeAnalyticsAccount -blobAccountKey -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsAccount -blobAccountKey -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaAccountTiers()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsAccountTiers -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsAccountTiers -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaFirewallRules()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsFirewall -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsFirewall -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaComputePolicy()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsComputePolicy -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsComputePolicy -location '{0}'",
ResourceGroupLocation));
}

#if NETSTANDARD
Expand All @@ -80,55 +68,45 @@ public void TestAdlaComputePolicy()
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaCatalog()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsCatalog -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsCatalog -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaJob()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsJob -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsJob -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAdlaJobRelationships()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-DataLakeAnalyticsJobRelationships -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-DataLakeAnalyticsJobRelationships -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNegativeAdlaAccount()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-NegativeDataLakeAnalyticsAccount -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-NegativeDataLakeAnalyticsAccount -location '{0}'",
ResourceGroupLocation));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNegativeAdlaJob()
{
AdlaTestsBase.NewInstance.RunPsTest(false,
_logger,
string.Format(
"Test-NegativeDataLakeAnalyticsJob -location '{0}'",
AdlaTestsBase.ResourceGroupLocation));
TestRunner.RunTestScript(string.Format(
"Test-NegativeDataLakeAnalyticsJob -location '{0}'",
ResourceGroupLocation));
}
}
}
Loading