This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net5.0</TargetFramework> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.21.0" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"CosmosDb": { | |
"Documentation": "https://docs.microsoft.com/en-us/azure/cosmos-db/linux-emulator", | |
"EndpointUri": "https://demo-database.local:8081", | |
"PrimaryKey": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace CosmosDbTest | |
{ | |
public class CosmosDbTests | |
{ | |
[OneTimeTearDown] | |
public void OneTimeTearDown() | |
{ | |
//Dispose of CosmosClient | |
_cosmosClient.Dispose(); // Move this to teardown of fixture | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Extensions.Configuration; | |
using NUnit.Framework; | |
namespace CosmosDbTest | |
{ | |
[SetUpFixture] | |
public static class TestSuite | |
{ | |
static TestSuite() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin | |
obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name of the project so that services specified in docker-compose for this project | |
# use the virtual network of that name: | |
COMPOSE_PROJECT_NAME=cosmosdb-demo-project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -PSEdition Core | |
# Additional steps to initialize the development container can be added in this file | |
# Note: this file is executed as a non-root user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo Running entrypoint.sh | |
################################################################################################################# | |
# Provided the Dockerfile doesn't change the user, this script will run as 'root'. However, once VS Code connects | |
# it will connect remotely as user 'dev' [Manfred, 19sep2021] | |
################################################################################################################# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/sdk:5.0.401 | |
# For other base images, check https://hub.docker.com/_/microsoft-dotnet-sdk/ | |
RUN apt-get update && \ | |
apt-get upgrade -y && \ | |
apt-get install -y procps iputils-ping net-tools | |
# procps: to support command 'ps' | |
# iputils-ping: to support command 'ping' (https://linuxconfig.org/ping-command-not-found-on-ubuntu-20-04-focal-fossa-linux) [Manfred, 19sep2021] | |
# net-tools: to support command such as 'arp', 'ifconfig', 'netstat', etc. (https://helpmanual.io/packages/apt/net-tools/) [Manfred, 26sep2021] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
cosmosdb-demo: | |
container_name: cosmosdb-demo-dev | |
hostname: demo-dev.local | |
build: | |
context: . | |
working_dir: /src | |
volumes: |
NewerOlder