azure - 如何使用 YAML 配置文件在 VSTS 中的 VS2017 代理中启动 Azure 存储模拟器
问题描述
在我的 azure-pipelines.yml 文件中,我有这个任务:
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
在我的集成测试中,我同时使用了 MSQLLocalDB(似乎工作正常)和 AzureStorageEmulator(没有)。
我想试试这个答案。
如何添加这些命令:
sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
sqllocaldb info MSSQLLocalDB
"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start
在测试任务之前运行 在测试开始之前运行 Azure 存储模拟器实例?
解决方案
尝试这个:
- script: '"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" create "v13.0" 13.0 -s'
displayName: 'Init Test Db'
- script: '"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start'
displayName: 'Start Storage Emulator'
需要在vs2017-win2016
vmImage 上。
推荐阅读
- reporting-services - SSRS 报告参数不是查询的一部分
- mysql - 索引列上的 SELECT 很慢
- c# - 如何根据两个值c#从表中选择行?
- google-bigquery - Youtube Data Studio,如何从两个不同的数据源(例如两个 BigQuery 表)创建计算字段
- vba - 更新事件不起作用
- python - django 的 Pandas 数据帧到 json
- java - Spring security - 无法进入登录页面
- php - 在模板中显示自定义帖子类型的自定义字段
- c# - C# 使用不同的参数重新启动线程
- angular - 使用 angular-oauth2-oidc 和“静默刷新”而不将白名单静默刷新.html