Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use docker directly on Linux instead of relying on third party action (…
…#18) * Update action.yml * Update action.yml * Update ci.yml * Update action.yml * Update action.yml * Update ci.yml * Update action.yml * Update action.yml * Move quiet * Real quiet * Make it chatty for now * Formatting * Try quiet again * Try bash * Update action.yml * Try to fix things * More output * Less output * Test connection refused * Bring back quiet * Grouping * Formatting * Add test project * Fix test name * Fix test * Create folder to make test runner happy * Use latest client * Print cluster details * Fix serialization * Logging * Better logging * Try fake call * Check replica set name * Adding the standard dependabot config * Adding reposync to make sure dependabot config is synced * Set replicaset in connstring * Add assert and fix syntax * Log conn string * rename * Echo * Test connection with replicaset * Write output * Check more conditions * Testing connections everywhere * Proper replica setup * T * Hardcode * Try something else * Different quoting * Proper * Try * Windows same * Align windows --------- Co-authored-by: Andreas Öhlund <andreas.ohlund@particular.net>
- Loading branch information
1 parent
e83893e
commit 8e18a35
Showing
8 changed files
with
309 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/assets | ||
/binaries | ||
/deploy | ||
/nugets | ||
build32 | ||
*.vshost.* | ||
.nu | ||
_UpgradeReport.* | ||
*.cache | ||
Thumbs.db | ||
*~ | ||
*.swp | ||
results | ||
CommonAssemblyInfo.cs | ||
lib/sqlite/System.Data.SQLite.dll | ||
*.orig | ||
*.zip | ||
Samples/DataBus/storage | ||
packages | ||
PrecompiledWeb | ||
tempstorage | ||
.learningtransport | ||
core-only | ||
Release | ||
Artifacts | ||
LogFiles | ||
csx | ||
*.ncrunchproject | ||
*.ncrunchsolution | ||
_NCrunch_NServiceBus/* | ||
logs | ||
run-git.cmd | ||
src/Chocolatey/Build/* | ||
|
||
installer/[F|f]iles | ||
installer/[C|c]ustom[A|a]ctions | ||
installer/ServiceControl-cache | ||
|
||
# Created by https://www.gitignore.io | ||
|
||
### VisualStudio ### | ||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.json.lock | ||
*.nuget.targets | ||
*.lock.json | ||
*.userosscache | ||
*.sln.docstates | ||
.vs/ | ||
local.settings.json | ||
|
||
# mac temp file ignore | ||
.DS_Store | ||
|
||
# Build results | ||
[Dd]ebug/ | ||
[Dd]ebugPublic/ | ||
[Rr]elease/ | ||
[Rr]eleases/ | ||
x64/ | ||
x86/ | ||
build/ | ||
bld/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# Roslyn cache directories | ||
*.ide/ | ||
|
||
# MSTest test Results | ||
[Tt]est[Rr]esult*/ | ||
[Bb]uild[Ll]og.* | ||
|
||
#NUNIT | ||
*.VisualState.xml | ||
TestResult.xml | ||
|
||
# NCrunch | ||
_NCrunch_* | ||
.*crunch*.local.xml | ||
|
||
# ReSharper is a .NET coding add-in | ||
_ReSharper*/ | ||
*.[Rr]e[Ss]harper | ||
*.DotSettings | ||
*.DotSettings.user | ||
|
||
src/scaffolding.config | ||
|
||
# Approval tests temp file | ||
*.received.* | ||
|
||
# JetBrains Rider | ||
.idea/ | ||
*.sln.iml | ||
|
||
# Visual Studio Code | ||
.vscode |
Empty file.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.8.34601.278 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{04C163B1-1840-450F-B837-8FFECDBCB8A7}" | ||
ProjectSection(SolutionItems) = preProject | ||
..\action.yml = ..\action.yml | ||
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml | ||
EndProjectSection | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "tests\Tests.csproj", "{E8FD91D3-D32B-4C92-9849-ECD6AEE39439}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{E8FD91D3-D32B-4C92-9849-ECD6AEE39439}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{E8FD91D3-D32B-4C92-9849-ECD6AEE39439}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{E8FD91D3-D32B-4C92-9849-ECD6AEE39439}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{E8FD91D3-D32B-4C92-9849-ECD6AEE39439}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {A5FE4431-5BCC-4407-B770-79B27F730761} | ||
EndGlobalSection | ||
EndGlobal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using MongoDB.Driver; | ||
using MongoDB.Driver.Core.Clusters; | ||
using NUnit.Framework; | ||
|
||
[TestFixture] | ||
class DriverCompatibilityTests | ||
{ | ||
[Test] | ||
public void Should_report_correct_cluster_type() | ||
{ | ||
var connectionString = Environment.GetEnvironmentVariable("MongoDBConnectionString"); | ||
TestContext.WriteLine("ConnectionString: " + connectionString); | ||
|
||
var client = new MongoClient(connectionString); | ||
|
||
//do a fake call to make sure that cluster details is fetched | ||
client.ListDatabases(); | ||
|
||
TestContext.WriteLine("State: " + client.Cluster.Description.State); | ||
TestContext.WriteLine("Type: " + client.Cluster.Description.Type); | ||
TestContext.WriteLine("ReplicaSetName: " + client.Cluster.Settings.ReplicaSetName); | ||
|
||
Assert.AreEqual(ClusterType.ReplicaSet, client.Cluster.Description.Type); | ||
Assert.AreEqual("tr0", client.Cluster.Settings.ReplicaSetName); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> | ||
<PackageReference Include="MongoDB.Driver" Version="2.24.0" /> | ||
<PackageReference Include="NUnit" Version="3.14.0" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |