2022-10-11 20:33:56 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace EndToEnd.Tests
|
|
|
|
|
{
|
|
|
|
|
public class TelemetryOptOutDefault : TestBase
|
|
|
|
|
{
|
|
|
|
|
[Fact]
|
|
|
|
|
public void TelemetryOptOutDefaultAttribute()
|
|
|
|
|
{
|
2022-11-05 22:13:09 +00:00
|
|
|
|
var versionCommand = new DotnetCommand()
|
2022-11-05 05:55:00 +00:00
|
|
|
|
.ExecuteWithCapturedOutput("--version");
|
|
|
|
|
|
2022-11-05 22:13:09 +00:00
|
|
|
|
var sdkVersion = versionCommand.StdOut.Trim();
|
2022-11-05 05:55:00 +00:00
|
|
|
|
|
|
|
|
|
var dotnetdir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk", sdkVersion);
|
2022-11-07 04:44:09 +00:00
|
|
|
|
|
2022-10-11 20:33:56 +00:00
|
|
|
|
var result = AssemblyInfo.Get(Path.Combine(dotnetdir, "dotnet.dll"), "AssemblyMetadataAttribute");
|
|
|
|
|
result.Should().Contain("TelemetryOptOutDefault:False");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|