Skip to content

Commit

Permalink
Merge branch 'main' into auto-update-autorest-pr-5159
Browse files Browse the repository at this point in the history
  • Loading branch information
archerzz authored Nov 13, 2024
2 parents b2a9639 + ea3e3d3 commit 26e9637
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 12 deletions.
2 changes: 2 additions & 0 deletions eng/scripts/Invoke-GenerateAndBuildV2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ for ($i = 0; $i -le $readmeFiles.Count - 1; $i++) {
$autorestConfigYaml = ConvertTo-YAML $yml
}
Invoke-GenerateAndBuildSDK -readmeAbsolutePath $readme -sdkRootPath $sdkPath -autorestConfigYaml "$autorestConfigYaml" -downloadUrlPrefix "$downloadUrlPrefix" -generatedSDKPackages $generatedSDKPackages
$generatedSDKPackages[$generatedSDKPackages.Count - 1]['readmeMd'] = @($readmeFile)
}

#update services without readme.md
Expand Down Expand Up @@ -156,6 +157,7 @@ if ($relatedTypeSpecProjectFolder) {
-generatedSDKPackages $generatedSDKPackages `
-specRepoRoot $swaggerDir
}
$generatedSDKPackages[$generatedSDKPackages.Count - 1]['typespecProject'] = @($typespecRelativeFolder)
}
}
$outputJson = [PSCustomObject]@{
Expand Down
13 changes: 12 additions & 1 deletion eng/scripts/automation/GenerateAndBuildLib.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -891,15 +891,26 @@ function GeneratePackage()
$ciFilePath = "sdk/$service/ci.mgmt.yml"
}

# get the sdk version
$version = ""
$projectFile = Join-Path $srcPath "$packageName.csproj"
$csproj = new-object xml
$csproj.PreserveWhitespace = $true
$csproj.Load($projectFile)
$versionNode = ($csproj | Select-Xml "Project/PropertyGroup/Version").Node
if ($versionNode) {
$version = $versionNode.InnerText
}
$packageDetails = @{
version=$version;
packageName="$packageName";
result=$result;
path=@("$path", "$ciFilePath");
packageFolder="$projectFolder";
artifacts=$artifacts;
apiViewArtifact=$apiViewArtifact;
language=".Net";
changelog=$changelog
changelog=$changelog;
}

if ($null -ne $installInstructions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Create a file `PlaywrightServiceSetup.cs` in the root directory with the below c
```C# Snippet:Sample2_SetDefaultAuthenticationMechanism
using Azure.Developer.MicrosoftPlaywrightTesting.NUnit;

namespace PlaywrightTests; // Remember to change this as per your project namespace
namespace PlaywrightTests.Sample2; // Remember to change this as per your project namespace
[SetUpFixture]
public class PlaywrightServiceSetup : PlaywrightServiceNUnit {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dotnet test --settings .runsettings

This issue only impacts the reporting feature. Currently, the service provides minimal support for the following [Azure Credential types.](https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#credential-classes)

Along with this, we also support passing a Managed Identity ClientId to be used along with `DefaultAzureCredential` and `ManagedIdentityCredential`.
Along with this, we also support passing a Managed Identity ClientId to be used along with `DefaultAzureCredential` and `ManagedIdentityCredential`.

If you only want to use cloud-hosted browsers along with your tests, you can disable the reporting feature by removing the logger from the runsettings file and then modify the `PlaywrightServiceSetup.cs` file as per the following.

Expand All @@ -51,7 +51,7 @@ using Azure.Core;
using Azure.Developer.MicrosoftPlaywrightTesting.NUnit;
using Azure.Identity;

namespace PlaywrightTests;
namespace PlaywrightTests.Sample1; // Remember to change this as per your project namespace
[SetUpFixture]
public class PlaywrightServiceSetup : PlaywrightServiceNUnit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This guide will walk you through the steps to integrate your Playwright project
```C# Snippet:Sample2_SetDefaultAuthenticationMechanism
using Azure.Developer.MicrosoftPlaywrightTesting.NUnit;

namespace PlaywrightTests; // Remember to change this as per your project namespace
namespace PlaywrightTests.Sample2; // Remember to change this as per your project namespace
[SetUpFixture]
public class PlaywrightServiceSetup : PlaywrightServiceNUnit {};
Expand Down Expand Up @@ -54,4 +54,4 @@ Run Playwright tests against browsers managed by the service using the configura

```dotnetcli
dotnet test --settings .runsettings
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Azure.Developer.MicrosoftPlaywrightTesting.NUnit;
using Azure.Identity;

namespace PlaywrightTests;
namespace PlaywrightTests.Sample1; // Remember to change this as per your project namespace

[SetUpFixture]
#if SNIPPET
Expand All @@ -23,4 +23,4 @@ public PlaywrightServiceSetup() : base(managedIdentityCredential) {}
public Sample1ServiceSetup() : base(managedIdentityCredential) {}
#endif
}
#endregion
#endregion
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#region Snippet:Sample2_SetDefaultAuthenticationMechanism
using Azure.Developer.MicrosoftPlaywrightTesting.NUnit;

namespace PlaywrightTests; // Remember to change this as per your project namespace
namespace PlaywrightTests.Sample2; // Remember to change this as per your project namespace

[SetUpFixture]
#if SNIPPET
public class PlaywrightServiceSetup : PlaywrightServiceNUnit {};
#else
public class Sample2ServiceSetup : PlaywrightServiceNUnit { };
#endif
#endregion
#endregion
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ skip-csproj: true
modelerfour:
flatten-payloads: false
use-model-reader-writer: true
use-write-core: true

#mgmt-debug:
# show-serialized-names: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
directory: specification/translation/Azure.AI.DocumentTranslation
commit: 0410d404c68289cb1737d06bba92133bb84b515c
commit: 533d972b32b91774f13e5b56190ab6573760ee85
repo: Azure/azure-rest-api-specs

0 comments on commit 26e9637

Please sign in to comment.