diff --git a/WebJobs.Script.sln b/WebJobs.Script.sln index 329c7f59d2..11cb0ad39c 100644 --- a/WebJobs.Script.sln +++ b/WebJobs.Script.sln @@ -22,8 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{AFB0F5F7-A EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.Script.Tests", "test\WebJobs.Script.Tests\WebJobs.Script.Tests.csproj", "{3BA93614-3A4A-49B0-BFBC-7831E2C02BB7}" EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "WebJobs.Script.Tests.Shared", "test\WebJobs.Script.Tests.Shared\WebJobs.Script.Tests.Shared.shproj", "{35C9CCB7-D8B6-4161-BB0D-BCFA7C6DCFFB}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.Script.Tests.Integration", "test\WebJobs.Script.Tests.Integration\WebJobs.Script.Tests.Integration.csproj", "{EDDDAED1-0E37-4ED7-A595-63F686DEE90A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.Script.Grpc", "src\WebJobs.Script.Grpc\WebJobs.Script.Grpc.csproj", "{38920568-003E-448F-963B-41B739D1E01C}" @@ -65,6 +63,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFunctions", "test\Resou EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebJobsStartupTests", "test\Resources\TestProjects\WebJobsStartupTests\WebJobsStartupTests.csproj", "{3746E49F-DD26-4CBD-B961-0ADF6EA84909}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebJobs.Script.Tests.Shared", "test\WebJobs.Script.Tests.Shared\WebJobs.Script.Tests.Shared.csproj", "{6C6ABC17-1262-4AD8-8CDA-AF6819EF60EE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -141,6 +141,10 @@ Global {3746E49F-DD26-4CBD-B961-0ADF6EA84909}.Debug|Any CPU.Build.0 = Debug|Any CPU {3746E49F-DD26-4CBD-B961-0ADF6EA84909}.Release|Any CPU.ActiveCfg = Release|Any CPU {3746E49F-DD26-4CBD-B961-0ADF6EA84909}.Release|Any CPU.Build.0 = Release|Any CPU + {6C6ABC17-1262-4AD8-8CDA-AF6819EF60EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C6ABC17-1262-4AD8-8CDA-AF6819EF60EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C6ABC17-1262-4AD8-8CDA-AF6819EF60EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C6ABC17-1262-4AD8-8CDA-AF6819EF60EE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -150,7 +154,6 @@ Global {BCFBE330-871A-44BE-9016-83845231230F} = {16351B76-87CA-4A8C-80A1-3DD83A0C4AA6} {D5162088-C119-4A06-896D-E65983CAEDFD} = {16351B76-87CA-4A8C-80A1-3DD83A0C4AA6} {3BA93614-3A4A-49B0-BFBC-7831E2C02BB7} = {AFB0F5F7-A612-4F4A-94DD-8B69CABF7970} - {35C9CCB7-D8B6-4161-BB0D-BCFA7C6DCFFB} = {AFB0F5F7-A612-4F4A-94DD-8B69CABF7970} {EDDDAED1-0E37-4ED7-A595-63F686DEE90A} = {AFB0F5F7-A612-4F4A-94DD-8B69CABF7970} {38920568-003E-448F-963B-41B739D1E01C} = {16351B76-87CA-4A8C-80A1-3DD83A0C4AA6} {9A522D9D-2D86-4572-B7D1-ECBFBFAF312C} = {16351B76-87CA-4A8C-80A1-3DD83A0C4AA6} @@ -167,13 +170,9 @@ Global {AACC1353-EA9B-4FCE-A50F-6A27900C088C} = {B2312621-6D0A-429F-9A45-06B45CE69691} {98B2CC4A-33EB-4310-B08D-3DB58630E981} = {B2312621-6D0A-429F-9A45-06B45CE69691} {3746E49F-DD26-4CBD-B961-0ADF6EA84909} = {B2312621-6D0A-429F-9A45-06B45CE69691} + {6C6ABC17-1262-4AD8-8CDA-AF6819EF60EE} = {AFB0F5F7-A612-4F4A-94DD-8B69CABF7970} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {85400884-5FFD-4C27-A571-58CB3C8CAAC5} EndGlobalSection - GlobalSection(SharedMSBuildProjectFiles) = preSolution - test\WebJobs.Script.Tests.Shared\WebJobs.Script.Tests.Shared.projitems*{35c9ccb7-d8b6-4161-bb0d-bcfa7c6dcffb}*SharedItemsImports = 13 - test\WebJobs.Script.Tests.Shared\WebJobs.Script.Tests.Shared.projitems*{3ba93614-3a4a-49b0-bfbc-7831e2c02bb7}*SharedItemsImports = 5 - test\WebJobs.Script.Tests.Shared\WebJobs.Script.Tests.Shared.projitems*{edddaed1-0e37-4ed7-a595-63f686dee90a}*SharedItemsImports = 5 - EndGlobalSection EndGlobal diff --git a/src/WebJobs.Script.Grpc/Properties/AssemblyInfo.cs b/src/WebJobs.Script.Grpc/Properties/AssemblyInfo.cs index 6c2d8837b2..4ead902d16 100644 --- a/src/WebJobs.Script.Grpc/Properties/AssemblyInfo.cs +++ b/src/WebJobs.Script.Grpc/Properties/AssemblyInfo.cs @@ -6,4 +6,5 @@ [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Benchmarks")] [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests")] [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests.Integration")] +[assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests.Shared")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] \ No newline at end of file diff --git a/src/WebJobs.Script.WebHost/Properties/AssemblyInfo.cs b/src/WebJobs.Script.WebHost/Properties/AssemblyInfo.cs index 178b727520..eabfca8f86 100644 --- a/src/WebJobs.Script.WebHost/Properties/AssemblyInfo.cs +++ b/src/WebJobs.Script.WebHost/Properties/AssemblyInfo.cs @@ -6,6 +6,7 @@ [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Benchmarks")] [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests")] [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests.Integration")] +[assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests.Shared")] // This assembly is the default dynamic assembly generated by Castle DynamicProxy used by Moq. [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] \ No newline at end of file diff --git a/src/WebJobs.Script/Properties/AssemblyInfo.cs b/src/WebJobs.Script/Properties/AssemblyInfo.cs index 77db08928c..0a98ac11a2 100644 --- a/src/WebJobs.Script/Properties/AssemblyInfo.cs +++ b/src/WebJobs.Script/Properties/AssemblyInfo.cs @@ -19,4 +19,5 @@ [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.WebHost.Core")] [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests")] [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests.Integration")] +[assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Script.Tests.Shared")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] \ No newline at end of file diff --git a/test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj b/test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj index f6e0e44623..1a7f9be3d5 100644 --- a/test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj +++ b/test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj @@ -34,6 +34,7 @@ + @@ -60,6 +61,4 @@ - - diff --git a/test/WebJobs.Script.Tests.Shared/HttpTestHelpers.cs b/test/WebJobs.Script.Tests.Shared/HttpTestHelpers.cs index e30a0e9001..7be337aafb 100644 --- a/test/WebJobs.Script.Tests.Shared/HttpTestHelpers.cs +++ b/test/WebJobs.Script.Tests.Shared/HttpTestHelpers.cs @@ -28,7 +28,7 @@ public static HttpRequest CreateHttpRequest(string method, string uriString, IHe if (!string.IsNullOrEmpty(uri.Host)) { - headers.Add("Host", uri.Host); + headers.Host = uri.Host; } if (body != null) @@ -50,7 +50,7 @@ public static HttpRequest CreateHttpRequest(string method, string uriString, IHe requestFeature.Body = new MemoryStream(bytes); request.ContentLength = request.Body.Length; - headers.Add("Content-Length", request.Body.Length.ToString()); + headers.ContentLength = request.Body.Length; } requestFeature.Headers = headers; diff --git a/test/WebJobs.Script.Tests.Shared/TestOptionsMonitor.cs b/test/WebJobs.Script.Tests.Shared/TestOptionsMonitor.cs index 74a2796e18..0c57aa5c1b 100644 --- a/test/WebJobs.Script.Tests.Shared/TestOptionsMonitor.cs +++ b/test/WebJobs.Script.Tests.Shared/TestOptionsMonitor.cs @@ -40,7 +40,7 @@ public IDisposable OnChange(Action listener) return Disposable.Empty; } - internal void InvokeChanged() + public void InvokeChanged() { _listener?.Invoke(CurrentValue, null); } diff --git a/test/WebJobs.Script.Tests.Shared/TestOutputHelperLogger.cs b/test/WebJobs.Script.Tests.Shared/TestOutputHelperLogger.cs index e2a3182e18..88b10ee68c 100644 --- a/test/WebJobs.Script.Tests.Shared/TestOutputHelperLogger.cs +++ b/test/WebJobs.Script.Tests.Shared/TestOutputHelperLogger.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.WebJobs.Script.Tests { - internal class TestOutputHelperLogger : ILogger + public class TestOutputHelperLogger : ILogger { private readonly ITestOutputHelper _outputHelper; diff --git a/test/WebJobs.Script.Tests.Shared/TestSecretManager.cs b/test/WebJobs.Script.Tests.Shared/TestSecretManager.cs index 29bd63c961..2e0ca7fea5 100644 --- a/test/WebJobs.Script.Tests.Shared/TestSecretManager.cs +++ b/test/WebJobs.Script.Tests.Shared/TestSecretManager.cs @@ -12,7 +12,7 @@ namespace Microsoft.Azure.WebJobs.Script.Tests { public class TestSecretManager : ISecretManager { - internal const string TestMasterKey = "1234"; + public const string TestMasterKey = "1234"; private Dictionary _hostSystemKeys; private Dictionary _hostFunctionKeys; diff --git a/test/WebJobs.Script.Tests.Shared/TestServiceCollectionExtensions.cs b/test/WebJobs.Script.Tests.Shared/TestServiceCollectionExtensions.cs index c53c8ef65c..03ff94822e 100644 --- a/test/WebJobs.Script.Tests.Shared/TestServiceCollectionExtensions.cs +++ b/test/WebJobs.Script.Tests.Shared/TestServiceCollectionExtensions.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.WebJobs.Script.Tests { - internal static class TestServiceCollectionExtensions + public static class TestServiceCollectionExtensions { public static IServiceCollection SkipDependencyValidation(this IServiceCollection services) { diff --git a/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.csproj b/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.csproj new file mode 100644 index 0000000000..408ffb0d76 --- /dev/null +++ b/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.csproj @@ -0,0 +1,18 @@ + + + + net8.0 + Microsoft.Azure.WebJobs.Script.Tests.Shared + + + + + + + + + + + + + diff --git a/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.projitems b/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.projitems deleted file mode 100644 index 4a6ccbc0cb..0000000000 --- a/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.projitems +++ /dev/null @@ -1,56 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - 35c9ccb7-d8b6-4161-bb0d-bcfa7c6dcffb - - - Microsoft.Azure.WebJobs.Script.Tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.shproj b/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.shproj deleted file mode 100644 index 5c2f97dd11..0000000000 --- a/test/WebJobs.Script.Tests.Shared/WebJobs.Script.Tests.Shared.shproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - 35c9ccb7-d8b6-4161-bb0d-bcfa7c6dcffb - 14.0 - - - - - - - - - diff --git a/test/WebJobs.Script.Tests/WebJobs.Script.Tests.csproj b/test/WebJobs.Script.Tests/WebJobs.Script.Tests.csproj index 03f6e9b02f..713a9686d3 100644 --- a/test/WebJobs.Script.Tests/WebJobs.Script.Tests.csproj +++ b/test/WebJobs.Script.Tests/WebJobs.Script.Tests.csproj @@ -40,6 +40,7 @@ + @@ -58,6 +59,4 @@ - -