Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

TestContainers generated by tested from docker file of another project
bhugot
#1 Posted : Wednesday, September 4, 2024 9:47:15 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/19/2018(UTC)
Posts: 10
Location: France

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hello,

I try to do something that seems not doable.

I have a simple Projet with a docker file
And I also have a Test Project that use TestContainer to build Docker Image.


var image = new ImageFromDockerfileBuilder()
.WithLogger(logger)
.WithDockerfileDirectory(CommonDirectoryPath.GetSolutionDirectory(), "")
.WithDockerfile("samples/Sample.Function.InProcess/Dockerfile")
.WithName(_image.FullName)
.WithDeleteIfExists(true)
.WithCleanUp(true)
.Build();

Is there any way to make it work with ncrunch ?

Regards
Remco
#2 Posted : Thursday, September 5, 2024 1:37:18 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,143

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting.

I am unfamiliar with this particular framework, which makes it hard for me to give specific advice on its limitations in regards to NCrunch. However, it looks to me like the framework is designed to treat the solution as a single cohesive unit (based on the need to inject the solution directory). This sort of structure isn't something that is supported under NCrunch, because we separate projects from the solution and into background workspaces where they can be crunched in isolation.

I recommend having a look at NCrunch's project atomicity constraints, and make sure you are aware of how absolute file references work in NCrunch. It may be that you can rig something up with copied files or references to the foreground solution that might give some degree of a workaround.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.043 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download