Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add load balancer tests
  • Loading branch information
Xinyu He committed Aug 23, 2024
commit 50fc9f3a2ca7c2495e9ab045de605ed76552369c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/<service name>/Azure.ResourceManager.ContainerOrchestratorRuntime",
"TagPrefix": "net/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime",
"Tag": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
<ItemGroup>
<ProjectReference Include="..\src\Azure.ResourceManager.ContainerOrchestratorRuntime.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.ResourceManager.Kubernetes" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Collections.Generic;
using Azure.Core;
using Azure.Core.TestFramework;
using Azure.ResourceManager.ContainerOrchestratorRuntime.Models;
using Azure.ResourceManager.Kubernetes;
using NUnit.Framework;

namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Tests.Tests
{
[TestFixture]
public class LoadBalancerTests : ContainerOrchestratorRuntimeManagementTestBase
{
public LoadBalancerTests() : base(false)
{
}

[TestCase]
[RecordedTest]
public void CreateLoadBalancer()
{
var connectedCluster = ConnectedClusterResource.CreateResourceIdentifier("b9e38f20-7c9c-4497-a25d-1a0c5eef2108", "xinyuhe-canary", "test-cluster-euap-arc");
var loadBalancerCollection = new LoadBalancerCollection(Client, connectedCluster);
var loadBalancerData = new LoadBalancerData
{
AdvertiseMode = AdvertiseMode.ARP
};
loadBalancerData.Addresses.Add("192.168.10.1/32");
loadBalancerCollection.CreateOrUpdate(WaitUntil.Completed, "testlb", loadBalancerData);
var bgpPeerData = new BgpPeerData
{
MyAsn = 64000,
PeerAsn = 64001,
PeerAddress = "192.168.2.0"
};
var bgpPeerCollection = new BgpPeerCollection(Client, connectedCluster);
bgpPeerCollection.CreateOrUpdate(WaitUntil.Completed, "testpeer", bgpPeerData);
}
}
}