From 457d322dc2e73903c868a3a7d3399fe31991e528 Mon Sep 17 00:00:00 2001 From: Apollo3zehn Date: Tue, 25 Apr 2023 13:12:22 +0200 Subject: [PATCH] Make version configurable. --- tests/Nexus.Sources.Remote.Tests/SetupDockerTests.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Nexus.Sources.Remote.Tests/SetupDockerTests.cs b/tests/Nexus.Sources.Remote.Tests/SetupDockerTests.cs index dedd3c8..63a30a4 100644 --- a/tests/Nexus.Sources.Remote.Tests/SetupDockerTests.cs +++ b/tests/Nexus.Sources.Remote.Tests/SetupDockerTests.cs @@ -12,13 +12,13 @@ public class SetupDockerTests { #if LINUX [Theory] - [InlineData("python", "main.py nexus-main {remote-port}")] - [InlineData("dotnet", "nexus-remoting-sample.csproj nexus-main {remote-port}")] + [InlineData("python", "main.py nexus-main {remote-port}", "v2.0.0-beta.1")] + [InlineData("dotnet", "nexus-remoting-sample.csproj nexus-main {remote-port}", "v2.0.0-beta.1")] #endif - public async Task CanReadFullDay(string satelliteId, string command) + public async Task CanReadFullDay(string satelliteId, string command, string version) { var dataSource = new Remote() as IDataSource; - var context = CreateContext(satelliteId, command); + var context = CreateContext(satelliteId, command, version); await dataSource.SetContextAsync(context, NullLogger.Instance, CancellationToken.None); @@ -75,7 +75,7 @@ await dataSource.ReadAsync( Assert.True(expectedStatus.SequenceEqual(status.ToArray())); } - private static DataSourceContext CreateContext(string satelliteId, string command) + private static DataSourceContext CreateContext(string satelliteId, string command, string version) { return new DataSourceContext( ResourceLocator: default, @@ -95,7 +95,7 @@ private static DataSourceContext CreateContext(string satelliteId, string comman ["template"] = JsonSerializer.SerializeToElement("docker"), ["command"] = JsonSerializer.SerializeToElement(command), ["git-url"] = JsonSerializer.SerializeToElement($"https://github.com/malstroem-labs/nexus-remoting-template-{satelliteId}"), - ["git-tag"] = JsonSerializer.SerializeToElement("v2.0.0-beta.1") + ["git-tag"] = JsonSerializer.SerializeToElement(version) }, RequestConfiguration: default );