Public surface test cleanup. Code cleanup (test fixes, renames, project name changes)
This commit is contained in:
Родитель
70b548b3b0
Коммит
42a711763d
|
@ -41,7 +41,7 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "WebJobs.Shared", "src\Micro
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.ServiceBus.UnitTests", "test\Microsoft.Azure.WebJobs.ServiceBus.UnitTests\WebJobs.ServiceBus.UnitTests.csproj", "{D37637D5-7EF9-43CB-86BE-537473CD613B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.Extension.Storage", "src\Microsoft.Azure.WebJobs.Extension.Storage\WebJobs.Extension.Storage.csproj", "{A9733406-267C-4A53-AB07-D3A834E22153}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.Extensions.Storage", "src\Microsoft.Azure.WebJobs.Extensions.Storage\WebJobs.Extensions.Storage.csproj", "{A9733406-267C-4A53-AB07-D3A834E22153}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.Host.Storage", "src\Microsoft.Azure.WebJobs.Host.Storage\WebJobs.Host.Storage.csproj", "{DED33098-FE99-436C-96CC-B59A30BEF027}"
|
||||
EndProject
|
||||
|
@ -49,7 +49,7 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "WebJobs.Shared.Storage", "s
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.EventHubs", "src\Microsoft.Azure.WebJobs.Extensions.EventHubs\WebJobs.EventHubs.csproj", "{8498FA6B-3843-44A4-A351-E35711B7FFDF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.Extension.Storage.UnitTests", "test\Microsoft.Azure.Webjobs.Extension.Storage.UnitTests\WebJobs.Extension.Storage.UnitTests.csproj", "{0CC5741F-ACDA-4DB8-9C17-074E8896F244}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebJobs.Extensions.Storage.UnitTests", "test\Microsoft.Azure.Webjobs.Extensions.Storage.UnitTests\WebJobs.Extensions.Storage.UnitTests.csproj", "{0CC5741F-ACDA-4DB8-9C17-074E8896F244}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "WebJobs.Protocols", "src\Microsoft.Azure.WebJobs.Protocols\WebJobs.Protocols.shproj", "{6FCD0852-6019-4CD5-9B7E-0DE021A72BD7}"
|
||||
EndProject
|
||||
|
|
|
@ -19,7 +19,6 @@ install:
|
|||
$env:CommitHash = "$env:APPVEYOR_REPO_COMMIT"
|
||||
|
||||
.\dotnet-install.ps1 -Version 2.1.300 -Architecture x86
|
||||
cache: '%USERPROFILE%\.nuget\packages'
|
||||
build_script:
|
||||
- ps: |
|
||||
$buildNumber = 0
|
||||
|
@ -55,7 +54,7 @@ test_script:
|
|||
|
||||
$success = $success -and $?
|
||||
|
||||
dotnet test .\test\Microsoft.Azure.Webjobs.Extension.Storage.UnitTests\ -v q --no-build
|
||||
dotnet test .\test\Microsoft.Azure.Webjobs.Extensions.Storage.UnitTests\ -v q --no-build
|
||||
|
||||
$success = $success -and $?
|
||||
|
||||
|
|
|
@ -42,4 +42,8 @@
|
|||
<!-- Write out the source file for this project to point at raw.githubusercontent.com -->
|
||||
<WriteLinesToFile File="$(BaseIntermediateOutputPath)source_link.json" Overwrite="true" Lines='{"documents": { "$(SourceLinkRoot)\\*" : "$(RemoteUri.Replace(".git", "").Replace("github.com", "raw.githubusercontent.com"))/$(LatestCommit)/*" }}' />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)..\stylecop.json" Link="stylecop.json" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -20,25 +20,15 @@ namespace SampleHost
|
|||
{
|
||||
var builder = new HostBuilder()
|
||||
.UseEnvironment("Development")
|
||||
.ConfigureWebJobsHost(o =>
|
||||
{
|
||||
// Example setting options properties:
|
||||
// o.HostId = "testhostid";
|
||||
})
|
||||
// These can be toggled independently!
|
||||
.ConfigureWebJobsHost()
|
||||
.AddWebJobsLogging() // Enables WebJobs v1 classic logging
|
||||
.AddStorageForRuntimeInternals() // enables WebJobs to run distributed, via a storage account to coordinate
|
||||
.AddAzureStorage() // adds [Blob], etc bindings for Azure Storage.
|
||||
.AddAzureStorageCoreServices()
|
||||
.AddAzureStorage()
|
||||
.AddApplicationInsights()
|
||||
.ConfigureAppConfiguration(config =>
|
||||
{
|
||||
// Adding command line as a configuration source
|
||||
config.AddCommandLine(args);
|
||||
config.AddInMemoryCollection(new Dictionary<string, string>()
|
||||
{
|
||||
// Configuration options set from configuration providers:
|
||||
{ "HostId", "testhostidfromprovider" }
|
||||
});
|
||||
})
|
||||
.ConfigureLogging(b =>
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Extensions.EventHubs\WebJobs.EventHubs.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Extension.Storage\WebJobs.Extension.Storage.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Extensions.Storage\WebJobs.Extensions.Storage.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Host.Storage\WebJobs.Host.Storage.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Host\WebJobs.Host.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Logging.ApplicationInsights\WebJobs.Logging.ApplicationInsights.csproj" />
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
using System;
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Azure.EventHubs;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using static Microsoft.Azure.EventHubs.EventData;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Azure.EventHubs.Processor" Version="1.0.3" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -21,12 +21,12 @@ namespace Microsoft.Azure.WebJobs.Host.Blobs.Bindings
|
|||
IAsyncConverter<BlobAttribute, CloudBlobDirectory>,
|
||||
IAsyncConverter<BlobAttribute, BlobExtensionConfig.MultiBlobContext>
|
||||
{
|
||||
private XStorageAccountProvider _accountProvider;
|
||||
private StorageAccountProvider _accountProvider;
|
||||
private IContextGetter<IBlobWrittenWatcher> _blobWrittenWatcherGetter;
|
||||
private INameResolver _nameResolver;
|
||||
private IConverterManager _converterManager;
|
||||
|
||||
public BlobExtensionConfig(XStorageAccountProvider accountProvider,
|
||||
public BlobExtensionConfig(StorageAccountProvider accountProvider,
|
||||
IContextGetter<IBlobWrittenWatcher> contextAccessor,
|
||||
INameResolver nameResolver,
|
||||
IConverterManager converterManager)
|
|
@ -8,7 +8,7 @@ using Microsoft.Azure.WebJobs.Host.Protocols;
|
|||
using Microsoft.Azure.WebJobs.Host.Queues;
|
||||
using Microsoft.WindowsAzure.Storage.Queue;
|
||||
using Newtonsoft.Json;
|
||||
using WebJobs.Extension.Storage;
|
||||
using WebJobs.Extensions.Storage;
|
||||
|
||||
namespace Microsoft.Azure.WebJobs.Host.Blobs.Listeners
|
||||
{
|
|
@ -23,10 +23,10 @@ namespace Microsoft.Azure.WebJobs.Host.Blobs.Triggers
|
|||
{
|
||||
internal class BlobTriggerExtensionConfig : IExtensionConfigProvider
|
||||
{
|
||||
private XStorageAccountProvider _accountProvider;
|
||||
private StorageAccountProvider _accountProvider;
|
||||
private BlobTriggerAttributeBindingProvider _triggerBinder;
|
||||
|
||||
public BlobTriggerExtensionConfig(XStorageAccountProvider accountProvider, BlobTriggerAttributeBindingProvider triggerBinder)
|
||||
public BlobTriggerExtensionConfig(StorageAccountProvider accountProvider, BlobTriggerAttributeBindingProvider triggerBinder)
|
||||
{
|
||||
_accountProvider = accountProvider;
|
||||
_triggerBinder = triggerBinder;
|
||||
|
@ -77,7 +77,7 @@ namespace Microsoft.Azure.WebJobs.Host.Blobs.Triggers
|
|||
internal class BlobTriggerAttributeBindingProvider : ITriggerBindingProvider
|
||||
{
|
||||
private readonly INameResolver _nameResolver;
|
||||
private readonly XStorageAccountProvider _accountProvider;
|
||||
private readonly StorageAccountProvider _accountProvider;
|
||||
private readonly IHostIdProvider _hostIdProvider;
|
||||
private readonly JobHostQueuesOptions _queueOptions;
|
||||
private readonly JobHostBlobsOptions _blobsOptions;
|
||||
|
@ -90,7 +90,7 @@ namespace Microsoft.Azure.WebJobs.Host.Blobs.Triggers
|
|||
|
||||
public BlobTriggerAttributeBindingProvider(INameResolver nameResolver,
|
||||
|
||||
XStorageAccountProvider accountProvider,
|
||||
StorageAccountProvider accountProvider,
|
||||
IHostIdProvider hostIdProvider,
|
||||
IOptions<JobHostQueuesOptions> queueOptions,
|
||||
IOptions<JobHostBlobsOptions> blobsConfiguration,
|
|
@ -4,9 +4,5 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//[assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.ServiceBus.UnitTests")]
|
||||
//[assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Host.TestCommon")]
|
||||
//[assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Host.FunctionalTests")]
|
||||
[assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Extension.Storage.UnitTests")]
|
||||
// [assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Host.UnitTests")]
|
||||
[assembly: InternalsVisibleTo("Microsoft.Azure.WebJobs.Extensions.Storage.UnitTests")]
|
||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
|
|
@ -20,10 +20,10 @@ namespace Microsoft.Azure.WebJobs.Host.Queues.Bindings
|
|||
internal class QueueExtension : IExtensionConfigProvider
|
||||
{
|
||||
private readonly IContextGetter<IMessageEnqueuedWatcher> _contextGetter;
|
||||
private readonly XStorageAccountProvider _storageAccountProvider;
|
||||
private readonly StorageAccountProvider _storageAccountProvider;
|
||||
private readonly QueueTriggerAttributeBindingProvider _triggerProvider;
|
||||
|
||||
public QueueExtension(XStorageAccountProvider storageAccountProvider, IContextGetter<IMessageEnqueuedWatcher> contextGetter,
|
||||
public QueueExtension(StorageAccountProvider storageAccountProvider, IContextGetter<IMessageEnqueuedWatcher> contextGetter,
|
||||
QueueTriggerAttributeBindingProvider triggerProvider)
|
||||
{
|
||||
_contextGetter = contextGetter;
|
||||
|
@ -51,13 +51,13 @@ namespace Microsoft.Azure.WebJobs.Host.Queues.Bindings
|
|||
private class PerHostConfig : IAsyncConverter<QueueAttribute, IAsyncCollector<CloudQueueMessage>>
|
||||
{
|
||||
// Fields that the various binding funcs need to close over.
|
||||
private XStorageAccountProvider _accountProvider;
|
||||
private StorageAccountProvider _accountProvider;
|
||||
|
||||
// Optimization where a queue output can directly trigger a queue input.
|
||||
// This is per-host (not per-config)
|
||||
private IContextGetter<IMessageEnqueuedWatcher> _messageEnqueuedWatcherGetter;
|
||||
|
||||
public void Initialize(ExtensionConfigContext context, XStorageAccountProvider storageAccountProvider, IContextGetter<IMessageEnqueuedWatcher> contextGetter)
|
||||
public void Initialize(ExtensionConfigContext context, StorageAccountProvider storageAccountProvider, IContextGetter<IMessageEnqueuedWatcher> contextGetter)
|
||||
{
|
||||
_accountProvider = storageAccountProvider;
|
||||
_messageEnqueuedWatcherGetter = contextGetter;
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче