NullReferenceException for functional tests after creating a new project with the template
DevRman opened this issue · 1 comments
Describe the bug
NullReferenceException for functional tests after creating a new project with the template.
To Reproduce
Steps to reproduce the behavior:
-
dotnet new ca-sln --client-framework Angular --output MyProj
-
cd MyProj\tests\Application.FunctionalTests\
-
dotnet test
-
See error
OneTimeSetUp: System.NullReferenceException : Object reference not set to an instance of an object.
Stapelverfolgung:
at DotNet.Testcontainers.Containers.DockerContainer.<>c__DisplayClass60_0.<g__CheckPortBindingsAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
at DotNet.Testcontainers.Configurations.WaitStrategy.<>c__DisplayClass1_0.<g__UntilAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
at DotNet.Testcontainers.Configurations.WaitStrategy.WaitUntilAsync(Func1 wait, TimeSpan frequency, TimeSpan timeout, CancellationToken ct) at DotNet.Testcontainers.Containers.DockerContainer.UnsafeStartAsync(CancellationToken ct) at DotNet.Testcontainers.Containers.DockerContainer.StartAsync(CancellationToken ct) at MyProj.Application.FunctionalTests.TestcontainersTestDatabase.InitialiseAsync() in C:\_eval_test_src\MyProj\tests\Application.FunctionalTests\TestcontainersTestDatabase.cs:line 26 at MyProj.Application.FunctionalTests.TestDatabaseFactory.CreateAsync() in C:\_eval_test_src\MyProj\tests\Application.FunctionalTests\TestDatabaseFactory.cs:line 9 at MyProj.Application.FunctionalTests.Testing.RunBeforeAnyTests() in C:\_eval_test_src\MyProj\tests\Application.FunctionalTests\Testing.cs:line 22 at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter
1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUpOrTearDownMethod(TestExecutionContext context, IMethodInfo method)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUp(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.OneTimeSetUpCommand.<>c__DisplayClass0_0.<.ctor>b__0(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeTestCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeTestCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformOneTimeSetUp()
Please ignore. I have just seen that I have installed the wrong .net version.