Skip to content

Commit ff6501a

Browse files
committed
Specs to tests
1 parent 018592d commit ff6501a

6 files changed

Lines changed: 47 additions & 16 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@description('Name of the Azure OpenAI instance. Must be globally unique and 3-63 characters, using only lowercase letters, numbers, and hyphens, starting and ending with a letter or number.')
2+
@minLength(3)
3+
@maxLength(63)
4+
param name string
5+
6+
@description('Location for the Azure OpenAI resource.')
7+
param location string
8+
9+
@description('Tags to apply to the Azure OpenAI resource.')
10+
param tags object = {}
11+
12+
@description('SKU for Azure OpenAI. Allowed values: Standard, Default is Standard.')
13+
@allowed([
14+
'Standard'
15+
])
16+
param sku string = 'Standard'
17+
18+
resource azoai 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
19+
name: name
20+
location: location
21+
tags: tags
22+
kind: 'OpenAI'
23+
sku: {
24+
name: sku
25+
}
26+
properties: {
27+
apiProperties: {
28+
enableDynamicThrottling: true
29+
}
30+
networkAcls: {
31+
defaultAction: 'Allow'
32+
}
33+
}
34+
}
35+
36+
output id string = azoai.id

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
## Developer Workflows
1717
- **Build:** Use `build.cmd` or `build.sh` in `src/` to build the solution.
18-
- **Test:** Integration specs in `src/gherkin Tests.Specs.Integration/` and `src/Tests.Specs.Integration/`.
18+
- **Test:** Integration specs in `src/gherkin Tests.Integration/` and `src/Tests.Integration/`.
1919
- **Run:** Launch via Visual Studio or `dotnet run` from solution root.
2020
- **CI/CD:** Managed by GitHub Actions (`.github/workflows/`).
2121
- **IaC Deploy:** See `can-digital-insights-iac.yml` for infrastructure deployment.

.github/workflows/gtc-agent-standalone-web-api-sql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
SRC_SLN: "Goodtocode.AgentFramework.Blazor.sln"
5353
API_PATH: "Presentation.WebApi"
5454
API_PROJECT: "Presentation.WebApi.csproj"
55-
TEST_PATH: "Tests.Specs.Integration"
56-
TEST_PROJECT: "Tests.Specs.Integration.csproj"
55+
TEST_PATH: "Tests.Integration"
56+
TEST_PROJECT: "Tests.Integration.csproj"
5757
WEB_PATH: "Presentation.Blazor"
5858
WEB_PROJECT: "Presentation.Blazor.csproj"
5959
INFRA_PATH: 'Infrastructure.SqlServer'

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@ To get started, follow the steps below:
8181
dotnet user-secrets set "OpenAI:ApiKey" "YOUR_API_KEY"
8282
```
8383
```
84-
cd ../Tests.Specs.Integration
84+
cd ../Tests.Integration
8585
dotnet user-secrets set "OpenAI:ApiKey" "YOUR_API_KEY"
8686
```
8787
5. Create your SQL Server database & schema (via *dotnet ef* command)
8888
```
8989
cd ../../
9090
dotnet ef database update --project .\src\Infrastructure.SqlServer\Infrastructure.SqlServer.csproj --startup-project .\src\Presentation.WebApi\Presentation.WebApi.csproj --context AgentFrameworkContext --connection "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AgentFramework;Min Pool Size=3;MultipleActiveResultSets=True;Trusted_Connection=Yes;TrustServerCertificate=True;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30"
9191
```
92-
6. Run Tests (Tests.Specs.Integration)
92+
6. Run Tests (Tests.Integration)
9393
```
94-
cd src/Tests.Specs.Integration
94+
cd src/Tests.Integration
9595
dotnet test
9696
```
9797
7. Run Blazor Web Chat Client (Presentation.Blazor) and Web API (Presentation.WebApi)
@@ -214,14 +214,14 @@ Follow these steps to get your development environment set up:
214214
```
215215

216216
## Setup Azure Open AI or Open AI configuration
217-
**Important:** Do this for both Presentation.WebApi and Tests.Specs.Integration
217+
**Important:** Do this for both Presentation.WebApi and Tests.Integration
218218
### Azure Open AI
219219
```
220220
cd src/Presentation.WebApi
221221
dotnet user-secrets set "AzureOpenAI:ChatDeploymentName" "gpt-4"
222222
dotnet user-secrets set "AzureOpenAI:Endpoint" "https://YOUR_ENDPOINT.openai.azure.com/"
223223
dotnet user-secrets set "AzureOpenAI:ApiKey" "YOUR_API_KEY"
224-
cd ../Tests.Specs.Integration
224+
cd ../Tests.Integration
225225
dotnet user-secrets set "AzureOpenAI:ChatDeploymentName" "gpt-4"
226226
dotnet user-secrets set "AzureOpenAI:Endpoint" "https://YOUR_ENDPOINT.openai.azure.com/"
227227
dotnet user-secrets set "AzureOpenAI:ApiKey" "YOUR_API_KEY"
@@ -234,11 +234,11 @@ AzureOpenAI__ApiKey
234234
```
235235

236236
### Open AI
237-
Set API Key in both Presentation.WebApi and Tests.Specs.Integration projects
237+
Set API Key in both Presentation.WebApi and Tests.Integration projects
238238
```
239239
cd src/Presentation.WebApi
240240
dotnet user-secrets set "OpenAI:ApiKey" "YOUR_API_KEY"
241-
cd ../Tests.Specs.Integration
241+
cd ../Tests.Integration
242242
dotnet user-secrets set "OpenAI:ApiKey" "YOUR_API_KEY"
243243
```
244244
Alternately you can set in Environment variables

src/Goodtocode.AgentFramework.WebApi.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.SqlServer",
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.AgentFramework", "Infrastructure.AgentFramework\Infrastructure.AgentFramework.csproj", "{2091EF1C-2E75-488C-A822-9628E639FB98}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Specs.Integration", "Tests.Specs.Integration\Tests.Specs.Integration.csproj", "{5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}"
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Integration", "Tests.Integration\Tests.Integration.csproj", "{5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}"
1717
EndProject
1818
Global
1919
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/Tests.Integration/Tests.Integration.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
<UserSecretsId>998fefad-d248-4bad-9d33-8a060711dd88</UserSecretsId>
1212
</PropertyGroup>
1313

14-
<ItemGroup>
15-
<None Remove="Actor\GetActorQueryStepDefinitions.cs~RFd5e051.TMP" />
16-
<None Remove="appsettings.test.json" />
17-
</ItemGroup>
18-
1914
<ItemGroup>
2015
<Content Include="appsettings.test.json">
2116
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

0 commit comments

Comments
 (0)