<commit_before>﻿$CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "")
Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan
. "$PSScriptRoot\constants.ps1"

Describe "$commandname Integration Tests" -Tags "IntegrationTests" {
	BeforeAll {
		$dbname = "dbatoolsci_publishdacpac"
		$server = Connect-DbaInstance -SqlInstance $script:instance1
		# Need a clean empty database
		$null = $server.Query("Create Database [$dbname]")
		$db = Get-DbaDatabase -SqlInstance $server -Database $dbname
		$null = $db.Query("CREATE TABLE dbo.example (id int); 
			INSERT dbo.example
			SELECT top 100 1 
			FROM sys.objects")
		$publishprofile = New-DbaPublishProfile -SqlInstance $script:instance1 -Database $dbname
	}
	AfterAll {
		Remove-DbaDatabase -SqlInstance $script:instance1 -Database $dbname -Confirm:$false
		Remove-Item -Confirm:$false -Path $publishprofile.FileName -ErrorAction SilentlyContinue
		Remove-Item -Confirm:$false -Path $dacpac.Path -ErrorAction SilentlyContinue
	}
	
	It -Skip "exports a dacpac" {
		$results = Export-DbaDacpac -SqlInstance $script:instance1 -Database $dbname
		Test-Path -Path $results.Path | Should Be $true
	}
}<commit_msg>set super explicit path (do *Export-DbaDacpac*)<commit_after>﻿$CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "")
Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan
. "$PSScriptRoot\constants.ps1"

Describe "$commandname Integration Tests" -Tags "IntegrationTests" {
	BeforeAll {
		$dbname = "dbatoolsci_publishdacpac"
		$server = Connect-DbaInstance -SqlInstance $script:instance1
		# Need a clean empty database
		$null = $server.Query("Create Database [$dbname]")
		$db = Get-DbaDatabase -SqlInstance $server -Database $dbname
		$null = $db.Query("CREATE TABLE dbo.example (id int); 
			INSERT dbo.example
			SELECT top 100 1 
			FROM sys.objects")
		$publishprofile = New-DbaPublishProfile -SqlInstance $script:instance1 -Database $dbname -Path $home
	}
	AfterAll {
		Remove-DbaDatabase -SqlInstance $script:instance1 -Database $dbname -Confirm:$false
		Remove-Item -Confirm:$false -Path $publishprofile.FileName -ErrorAction SilentlyContinue
		Remove-Item -Confirm:$false -Path $dacpac.Path -ErrorAction SilentlyContinue
	}
	
	It -Skip "exports a dacpac" {
		$results = Export-DbaDacpac -SqlInstance $script:instance1 -Database $dbname
		Test-Path -Path $results.Path | Should Be $true
	}
}
{'fraction_non_alphanumeric': 0.11742738589211618, 'fraction_numerical': 0.008298755186721992, 'mean_word_length': 4.823671497584541, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '906883', 'n_tokens_mistral': 838, 'n_tokens_neox': 763, 'n_words': 193}