Skip to content

Commit

Permalink
[Az.EventGrid] Add partner features from 2022-06-15 API (Azure#19729)
Browse files Browse the repository at this point in the history
* Add Get-AzEventGridVerifiedPartner

* Add initial partner cmdlets

* Add partner registration cmdlets

* Add partner topic cmdlets

* Add partner namespace cmdlets

* Add more cmdlets

* Add channel cmdlets

* Partial implementation of new event subscription cmdlets

* Add nested event subscription cmdlets

* Update PowerShell module version

* Partial implementation of Partner tests

* Remove nested even sub Cmdlets from this branch

* Fix issues in cmdlets

* Add partner tests

* Update test recordings

* Add newly generated help files

* Do not manually update module version

* Fix documentation and disable test that fails in pipeline

* Update partner tests so they run in playback mode

* Remove prompt from examples

* Fix documentation static analysis issues

* mend

Co-authored-by: Brandon Neff <brandonneff@microsoft.com>
  • Loading branch information
Brandon411 and Brandon Neff authored Oct 19, 2022
1 parent b3d7d4f commit 4ab1da6
Show file tree
Hide file tree
Showing 131 changed files with 28,533 additions and 9,746 deletions.
2 changes: 1 addition & 1 deletion src/EventGrid/EventGrid.Test/EventGrid.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.EventGrid" Version="7.0.0" />
<PackageReference Include="Microsoft.Azure.Management.EventGrid" Version="9.0.0" />
<PackageReference Include="Microsoft.Azure.Management.EventHub" Version="5.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Relay" Version="2.0.2" />
<PackageReference Include="Microsoft.Azure.Management.ServiceBus" Version="5.0.0" />
Expand Down
54 changes: 54 additions & 0 deletions src/EventGrid/EventGrid.Test/ScenarioTests/Common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ function Get-EventSubscriptionWebhookBaseEndpointWithCloudEvent
return "https://eventgridclitestapp.azurewebsites.net/api/cloudeventfunc"
}

<#
.SYNOPSIS
Get EventSubscription Storage QueueFunction Endpoint
#>
function Get-EventSubscriptionStorageQueueEndpoint
{
return "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/DevExpRg/providers/Microsoft.Storage/storageAccounts/devexpstg/queueServices/default/queues/stogqueuedestination"
}

<#
.SYNOPSIS
Get location
Expand Down Expand Up @@ -431,3 +440,48 @@ function Get-DomainTopicName
{
return "PSTestDomainTopic-" + (getAssetName)
}

<#
.SYNOPSIS
Get partner registration name
#>
function Get-PartnerRegistrationName
{
return "PSTestPartnerRegistration-" + (getAssetName)
}

<#
.SYNOPSIS
Get partner namespace name
#>
function Get-PartnerNamespaceName
{
return "PSTestPartnerNamespace-" + (getAssetName)
}

<#
.SYNOPSIS
Get channel name
#>
function Get-ChannelName
{
return "PSTestChannel-" + (getAssetName)
}

<#
.SYNOPSIS
Get partner topic name
#>
function Get-PartnerTopicName
{
return "PSTestPartnerTopic-" + (getAssetName)
}

<#
.SYNOPSIS
Get partner topic source
#>
function Get-PartnerTopicSource
{
return "PSTestPartnerTopicSource" + (getAssetName)
}
34 changes: 34 additions & 0 deletions src/EventGrid/EventGrid.Test/ScenarioTests/PartnerTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.Azure.Commands.EventGrid.Test.ScenarioTests
{
public class PartnerTests : EventGridTestRunner
{
public PartnerTests(ITestOutputHelper output) : base(output)
{
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void EventGrid_PartnersCRUD()
{
TestRunner.RunTestScript("PartnerTests");
}
}
}
224 changes: 224 additions & 0 deletions src/EventGrid/EventGrid.Test/ScenarioTests/PartnerTests.ps1

Large diffs are not rendered by default.

Loading

0 comments on commit 4ab1da6

Please sign in to comment.