Skip to content

Commit 8c41154

Browse files
authored
(#386) Removed infra and provided instructions on setting up runsettings in README (#391)
1 parent ad3fc8e commit 8c41154

File tree

10 files changed

+14
-673
lines changed

10 files changed

+14
-673
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,20 @@ The following NuGet packages have been published:
6161

6262
## Running Live Tests
6363

64-
The test suite for the library includes "live tests" against real servers that are not normally run. To run those tests, you will need access to an
65-
Azure account (you can sign up for one for free):
66-
67-
1. Install the [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd)
68-
2. Run `azd up` in a command line.
69-
70-
This script will create several resources. The cost of running those resources is approximately $40/month (US dollars). However, you will only have
71-
to run the services for less than an hour, so the cost of testing the library should be minimal. The process will create a `.runsettings` file in the
72-
tests directory which you can use to enable the live testing.
73-
74-
Live testing can be run using the Visual Studio Test Explorer or via `dotnet test`.
75-
76-
Once you have completed running the tests, you can remove the created services using `azd down`. This will also remove the `.runsettings` file so that
77-
live tests are not attempted any more.
64+
The majority of tests in the test suite provide [TestContainers](https://testcontainers.com/) so that the tests are run against real servers running inside containers. However, some test suites have not been set up yet or do not work as expected. For those services, you will need to provide a real service and configure the `.runsettings` file to run the service. Here is a typical `.runsettings` file:
65+
66+
```xml
67+
<?xml version="1.0" encoding="utf-8"?>
68+
<RunSettings>
69+
<RunConfiguration>
70+
<EnvironmentVariables>
71+
<ENABLE_SQL_LOGGING>true</ENABLE_SQL_LOGGING>
72+
<COSMOS_CONNECTION_STRING>{insert your connection string here}</COSMOS_CONNECTION_STRING>
73+
<AZSQL_CONNECTION_STRING>{insert your connection string here}</AZSQL_CONNECTION_STRING>
74+
</EnvironmentVariables>
75+
</RunConfiguration>
76+
</RunSettings>
77+
```
7878

7979
> **NOTE**: The `.runsettings` file contains secrets. It should not be checked in. We have added this file to the `.gitignore` to ensure that it is
8080
> not checked into public GitHub repositories.

infra/main.bicep

Lines changed: 0 additions & 57 deletions
This file was deleted.

infra/main.parameters.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

infra/modules/appservice.bicep

Lines changed: 0 additions & 104 deletions
This file was deleted.

infra/modules/azuresql.bicep

Lines changed: 0 additions & 78 deletions
This file was deleted.

infra/modules/cosmos-mongodb.bicep

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)