Skip to content

Commit 43991fa

Browse files
Copilotjohlju
andcommitted
Improve copilot instructions for better AI understanding and add SQL Server SMO section
Co-authored-by: johlju <[email protected]>
1 parent c4defdf commit 43991fa

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/copilot-instructions.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,14 @@ edge cases and common use cases are tested. The integration tests should
302302
also be written to test the command in a real environment, using real
303303
resources and dependencies.
304304

305-
Any integration tests script files for commands should be added to a group
306-
in the stage 'Integration_Test_Commands_SqlServer' in ./azure-pipelines.yml.
307-
The group number should be determined by what other command's integration test
308-
it is dependent on.
305+
Integration test script files for public commands must be added to a group
306+
within the 'Integration_Test_Commands_SqlServer' stage in ./azure-pipelines.yml.
307+
Choose the appropriate group number based on the dependencies of the command
308+
being tested (e.g., commands that require Database Engine should be in Group 2
309+
or later, after the Database Engine installation tests).
309310

310-
To dynamically get the computer name the CI has, always use the command
311-
Get-ComputerName (a command that is available in the build pipeline).
311+
When integration tests need the computer name in CI environments, always use
312+
the Get-ComputerName command, which is available in the build pipeline.
312313

313314
All integration tests must use the below code block prior to the first
314315
`Describe`-block. The following code will set up the integration test
@@ -351,6 +352,16 @@ The module DscResource.Test is used by the pipeline and its commands
351352
are normally not used when testing public functions, private functions or
352353
class-based resources.
353354

355+
## SQL Server
356+
357+
### SQL Server Management Objects (SMO)
358+
359+
When developing commands, private functions, class-based resources, or making
360+
modifications to existing functionality, always prefer using SQL Server
361+
Management Objects (SMO) as the primary method for interacting with SQL Server.
362+
Only use T-SQL when it is not possible to achieve the desired functionality
363+
with SMO.
364+
354365
## Change log
355366

356367
The Unreleased section in CHANGELOG.md should always be updated when making

0 commit comments

Comments
 (0)