Merge pull request #763 from microsoft/dev

Remove Forcerefresh
This commit is contained in:
Freddy Kristiansen 2019-11-27 07:11:41 +01:00 коммит произвёл GitHub
Родитель c0088290f3 6b80dae231
Коммит 132c4b0448
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -98,7 +98,7 @@ function Import-TestToolkitToNavContainer {
if (!(Test-Path (Join-Path $serviceTierAddInsFolder "Mock Assemblies"))) {
new-item -itemtype symboliclink -path $serviceTierAddInsFolder -name "Mock Assemblies" -value $mockAssembliesPath | Out-Null
Set-NavServerInstance $serverInstance -restart
while (Get-NavTenant $serverInstance -forcerefresh | Where-Object { $_.State -eq "Mounting" }) {
while (Get-NavTenant $serverInstance | Where-Object { $_.State -eq "Mounting" }) {
Start-Sleep -Seconds 1
}
}

Просмотреть файл

@ -1,7 +1,6 @@
0.6.4.20
Better error handling in Run-Tests and Get-Tests
Issue #755 Sort-AppFoldersByDependencies doesn't support "id" in dependencies
Add parameter forceRefresh to Get-NavContainerTenants
Wait for tenant ready when restarting service tier in Import-TestToolkitToNavContainer and Setup-NavContainerTestUsers
0.6.4.19

Просмотреть файл

@ -11,11 +11,10 @@
function Get-NavContainerTenants {
Param (
[Parameter(Mandatory=$false)]
[string] $containerName = "navserver",
[switch] $forceRefresh
[string] $containerName = "navserver"
)
Invoke-ScriptInNavContainer -containerName $containerName -ScriptBlock { Param($forceRefresh)
Invoke-ScriptInNavContainer -containerName $containerName -ScriptBlock {
$customConfigFile = Join-Path (Get-Item "C:\Program Files\Microsoft Dynamics NAV\*\Service").FullName "CustomSettings.config"
[xml]$customConfig = [System.IO.File]::ReadAllText($customConfigFile)
@ -23,8 +22,8 @@ function Get-NavContainerTenants {
throw "The Container is not setup for multitenancy"
}
Get-NavTenant -ServerInstance $ServerInstance -forceRefresh:$forceRefresh
} -argumentList $forceRefresh
Get-NavTenant -ServerInstance $ServerInstance
}
}
Set-Alias -Name Get-BCContainerTenants -Value Get-NavContainerTenants
Export-ModuleMember -Function Get-NavContainerTenants -Alias Get-BCContainerTenants

Просмотреть файл

@ -13,4 +13,4 @@ $credential = [PSCredential]::new("admin", (ConvertTo-SecureString -AsPlainText
. (Join-Path $PSScriptRoot '_CreateNavContainer.ps1')
. (Join-Path $PSScriptRoot '_CreateBcContainer.ps1')
. (Join-Path $PSScriptRoot "ObjectHandling.ps1")
. (Join-Path $PSScriptRoot "bacpac.ps1")

Просмотреть файл

@ -74,7 +74,7 @@ function Setup-NavContainerTestUsers {
if (!(Test-Path (Join-Path $serviceTierAddInsFolder "Mock Assemblies"))) {
new-item -itemtype symboliclink -path $serviceTierAddInsFolder -name "Mock Assemblies" -value $mockAssembliesPath | Out-Null
Set-NavServerInstance $serverInstance -restart
while (Get-NavTenant $serverInstance -forcerefresh | Where-Object { $_.State -eq "Mounting" }) {
while (Get-NavTenant $serverInstance | Where-Object { $_.State -eq "Mounting" }) {
Start-Sleep -Seconds 1
}
}