Azure DevOps托管生成控制器-是否支持Azure存储模拟器? [英] Azure DevOps Hosted Build Controller - Is the Azure Storage Emulator supported?
问题描述
我想运行利用Azure存储模拟器而不是Azure DevOps构建中的真实存储的单元/集成测试.
I'd like to run unit / integration tests that utilise the Azure Storage Emulator rather than real storage from a Azure DevOps build.
模拟器安装在托管的构建控制器作为Azure SDK的常规位置(C:\ Program Files(x86)\ Microsoft SDKs \ Azure \ Storage Emulator \ AzureStorageEmulator.exe).
The emulator is installed on the Hosted Build Controller as part of the Azure SDK in its usual place (C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe).
但是,仿真器在构建控制器上处于未初始化状态.尝试运行命令初始化,出现以下错误:
However the emulator is in the uninitialised state on the Build Controller. When trying to run the command Init from the command line, I get the following error:
This operation requires an interactive window station
是否存在已知的解决方法,或计划在Azure DevOps版本中支持模拟器?
Is there an known workaround for this or plans to support the emulator in Azure DevOps builds?
推荐答案
尽管这里有所有相反的答案,但我已经在VS2017托管的构建代理上运行Azure存储模拟器已有一年多了.
Despite all the answers here to the contrary, I've been running the Azure Storage Emulator on a VS2017 hosted build agent for over a year.
诀窍是首先初始化SQL LocalDB(仿真器使用它),然后启动仿真器.您可以通过运行以下命令行任务来做到这一点:
The trick is to initialise SQL LocalDB first (the emulator uses it), and then start the emulator. You can do this with a command line task that runs:
sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
sqllocaldb info MSSQLLocalDB
"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start
这篇关于Azure DevOps托管生成控制器-是否支持Azure存储模拟器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!