Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Jan 16, 2024
1 parent 7e70a0a commit 695457f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public override void Run(IEphemeralCluster<EphemeralClusterConfiguration> cluste
cluster.Writer,
fs.PluginBinary,
$"install opensearch plugin: {plugin.SubProductName}",
"install --batch", GetPluginLocation(plugin, v));
"install", "--batch", GetPluginLocation(plugin, v));

CopyConfigDirectoryToHomeCacheConfigDirectory(cluster, plugin);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,15 @@ public void Add(string setting)
public void Add(string key, string value, string versionRange) =>
Add(new NodeSetting(key, value, versionRange));

public string[] ToCommandLineArguments(OpenSearchVersion version)
{
var settingArgument = "-E ";
return this
public string[] ToCommandLineArguments(OpenSearchVersion version) =>
this
//if a node setting is only applicable for a certain version make sure its filtered out
.Where(s => string.IsNullOrEmpty(s.VersionRange) || version.InRange(s.VersionRange))
//allow additional settings to take precedence over already DefaultNodeSettings
//without relying on opensearch to dedup
.GroupBy(setting => setting.Key)
.Select(g => g.Last())
.Select(s => s.Key.StartsWith(settingArgument) ? s.ToString() : $"{settingArgument}{s}")
.SelectMany(s => new[] { "-E", s.ToString() })
.ToArray();
}
}
}
13 changes: 6 additions & 7 deletions build/scripts/ReposTooling.fs
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,16 @@ module ReposTooling =
let folder = Path.getDirectory (Paths.TestProjFile "Tests.YamlRunner")
let timeout = TimeSpan.FromMinutes(120.)
Tooling.DotNet.ExecInWithTimeout folder (["run"; "--" ] @ args) timeout |> ignore


let restoreOnce = lazy(Tooling.DotNet.Exec ["tool"; "restore"])

let private differ = "assembly-differ"
let Differ args =
restoreOnce.Force()

let args = args |> String.concat " "
let command = sprintf @"%s %s -o ../../%s" differ args Paths.BuildOutput
Tooling.DotNet.ExecIn Paths.TargetsFolder [command] |> ignore

let args = [differ] @ args @ ["-o"; $"../../{Paths.BuildOutput}"]
Tooling.DotNet.ExecIn Paths.TargetsFolder args

let private assemblyRewriter = "assembly-rewriter"
let Rewriter args =
Expand Down

0 comments on commit 695457f

Please sign in to comment.