Skip to content

Commit fb62f3c

Browse files
author
Stuart Padley
committed
Fix issue with tests having NotYetImplemented in them
1 parent 5034c80 commit fb62f3c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

AgentMode/.github/copilot-instructions.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,15 @@ and
236236
- You **MUST** start all stored procedure names with the word `test`.
237237
- You **MUST NOT** put a CREATE SCHEMA statement in the test .sql files. (this is because tSQLt already created the [UserStoryTests] schema for you)
238238

239-
### Step 12: User to check .sql files in ./Tests folder have all been saved
239+
### Step 12: Ensure all User Stories are fully implemented as tSQLt tests.
240+
241+
**Thought:** The above step can create .sql files in the `./Tests` folder, that have NotYetImplemented in them.
242+
243+
**Action:**
244+
- Ensure each User Story is fully implemented as a tSQLt test in a .sql file.
245+
- Exhaustively check each line of each user story is full validated by a test.
246+
247+
### Step 13: Check .sql files in ./Tests folder have all been saved
240248

241249
**Thought:** The above step can take a long time to complete, and Agent-Mode runs
242250
in parallel and asynchronously, so user needs to check that all the .sql files
@@ -246,13 +254,13 @@ and
246254
- The user must check that all the test .sql files have been saved in the `./Tests` folder.
247255
- If not, user must wait to proceed until all .sql files in the ./Tests folder have been saved by the agent.
248256

249-
### Step 13: Build and Publish the tSQLt User Story tests to SQL Server
257+
### Step 14: Build and Publish the tSQLt User Story tests to SQL Server
250258

251259
**Action:**
252260
- Build by running `Build.ps1` (which takes `-ProjectName` as the single parameter) and ensure no errors.
253261
- Publish to the SQL Server using SqlPackage by running `Publish.ps1` (which takes `-ProjectName` as the single parameter) and ensure no errors.
254262

255-
### Step 14: Run user story tests until they all pass.
263+
### Step 15: Run user story tests until they all pass.
256264

257265
**Action:**
258266
- Run `Test.ps1` (which takes `-ProjectName` as the single parameter) to run all the tests in the [UserStoryTests] schema. `Test.ps1` is in the `./.github/tsql/inner-loop` folder.

AgentMode/.github/tsql/inner-loop/Publish.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if (!(Test-Path $sourceFile)) {
2222
Write-Host "Source file: $sourceFile"
2323
# Run SqlPackage.exe /Action:Publish /SourceFile:$SourceFile /TargetConnectionString:$targetConnectionString /p:IncludeCompositeObjects=true
2424
# Note $targetConnectionString can have $ in it
25-
$publishCommand = "SqlPackage.exe /Action:Publish /SourceFile:$sourceFile /TargetConnectionString:$quotedConnectionString /p:IncludeCompositeObjects=true"
25+
$publishCommand = "$env:USERPROFILE\.dotnet\tools\SqlPackage.exe /Action:Publish /SourceFile:$sourceFile /TargetConnectionString:$quotedConnectionString /p:IncludeCompositeObjects=true"
2626
$publishCommand = $publishCommand -replace '\$', '`$' # Escape $ in the connection string
2727
Write-Host "Running command: $publishCommand"
2828
Invoke-Expression $publishCommand

0 commit comments

Comments
 (0)