Skip to content

Update test folder structure #4182

Closed

Description

@eriqua
  • Rename folder into e2e
  • Move folder into a new tests folder
  • Update Initialize-Pipeline to support new test folder name
  • Update Pester tests to support new test folder name
  • Update reference to main.bicep in main.test.bicep
  • Update reference to .shared/.scripts
  • Update reference to .shared/.templates

Activity

  1. eriqua commented on Nov 4, 2023

    @eriqua
    ContributorAuthor

    Run from modules

    $oldTestPaths=(Get-ChildItem -Filter '.test' -Directory -Recurse).FullName
       
    foreach ($testPath in $oldTestPaths){
    	$e2eDestination = Join-Path $testPath "e2e"
    	$childTestFolders = Get-ChildItem $testPath -Exclude *e2e
    	if (-not (Test-Path -Path $e2eDestination)) {
    		New-Item -Path $testPath -Name "e2e" -ItemType Directory
    	}
    	if (-not ([string]::IsNullOrEmpty($childTestFolders.FullName))) {
    		$childTestFolders.FullName | Move-Item -Destination $e2eDestination
    	}
    }
    
    foreach ($testPath in $oldTestPaths){
    	$newName = $testPath -replace '.test','tests'
    	Rename-Item -Path $testPath -NewName $newName  
    }

    Search&Replace

      '../../../../.shared/.scripts -> '../../../../../.shared/.scripts
      module testDeployment '../../main.bicep -> module testDeployment '../../../main.bicep
      '../../../../.shared/.templates -> '../../../../../.shared/.templates
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions