Skip to content

Conversation

digital88
Copy link
Contributor

@digital88 digital88 commented Mar 27, 2025

What does this PR do?

Wrapper for GCloud modules as per #1372 (comment)

Why is it important?

Will resolve #1372

How to test this PR

  • Build and pack:
dotnet pack src/Testcontainers
dotnet pack src/Testcontainers.BigQuery
dotnet pack src/Testcontainers.Bigtable
dotnet pack src/Testcontainers.Firestore
dotnet pack src/Testcontainers.PubSub
dotnet pack src/Testcontainers.GCloud
  • Create new test xunit project:
mkdir test-gcloud-package
cd test-gcloud-package
dotnet new xunit -n TestProject
  • Add empty nugetconfig:
dotnet new nugetconfig
  • Add this content to nugetconfig:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
<!--Change value attribute to point to Testcontainers.GCloud/bin/Release directory -->
    <add key="local0" value="../../testcontainers-dotnet/src/Testcontainers/bin/Release" />
    <add key="local1" value="../../testcontainers-dotnet/src/Testcontainers.GCloud/bin/Release" />
    <add key="local2" value="../../testcontainers-dotnet/src/Testcontainers.BigQuery/bin/Release" />
    <add key="local3" value="../../testcontainers-dotnet/src/Testcontainers.Bigtable/bin/Release" />
    <add key="local4" value="../../testcontainers-dotnet/src/Testcontainers.Firestore/bin/Release" />
    <add key="local5" value="../../testcontainers-dotnet/src/Testcontainers.PubSub/bin/Release" />
    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>
  • Restore project and put packages to local folder:
dotnet restore -f --no-cache --packages ./local-nuget-packages
  • Look into ./local-nuget-packages directory
image

Copy link

netlify bot commented Mar 27, 2025

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 9086c59
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/67e5b95540bd6c00088db318
😎 Deploy Preview https://deploy-preview-1411--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@HofmeisterAn
Copy link
Collaborator

This VersionOverride allows me to build and pack and test locally. The version variable in Directory.Build.props is already 4.4.0, but Nuget has v4.3.0 modules published - previous value of $(Version).

Simply use project references as we already do:

<ProjectReference Include="../Testcontainers.Azurite/Testcontainers.Azurite.csproj"/>

This ensures that the package references the correct version and is published in the proper order.

@digital88
Copy link
Contributor Author

Fixed csproj and edited OP

@HofmeisterAn HofmeisterAn added the chore A change that doesn't impact the existing functionality, e.g. internal refactorings or cleanups label Mar 29, 2025
@HofmeisterAn HofmeisterAn changed the title Add wrapper for gcloud packages chore: Add wrapper module for Google Cloud Mar 29, 2025
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@HofmeisterAn HofmeisterAn merged commit 81581aa into testcontainers:develop Mar 29, 2025
67 checks passed
@HofmeisterAn HofmeisterAn changed the title chore: Add wrapper module for Google Cloud chore: Add wrapper module for Google Cloud modules Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore A change that doesn't impact the existing functionality, e.g. internal refactorings or cleanups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add missing .NET modules to the Community Module Registry

2 participants