Esempio n. 1
0
        internal NomadAgentProcess NewServer(Action <NomadAgentConfiguration> configure = null)
        {
            var type   = GetType();
            var config = new NomadAgentConfiguration
            {
                Region  = "test-region",
                Name    = $"{type.Name}_{NomadAgentConfiguration.Count}",
                DataDir = $"{Path.GetTempPath()}nomaddir_{type.Name}_{NomadAgentConfiguration.Count}",
                Ports   = BasePorts.Add(NomadAgentConfiguration.Count),
            };

            configure?.Invoke(config);
            var process = new NomadAgentProcess(config, _output);

            process.Start();
            return(process);
        }
Esempio n. 2
0
        internal NomadAgentProcess NewClientServer()
        {
            var type    = GetType();
            var process = new NomadAgentProcess(new NomadAgentConfiguration
            {
                Region  = "test-region",
                Name    = $"{type.Name}_{NomadAgentConfiguration.Count}",
                DataDir = $"{Path.GetTempPath()}nomaddir_{type.Name}_{NomadAgentConfiguration.Count}",
                Ports   = BasePorts.Add(NomadAgentConfiguration.Count),
                Client  = new Client
                {
                    Enabled = true,
                    Options = new Dictionary <string, string> {
                        { "driver.raw_exec.enable", "1" }
                    }
                },
                LogLevel = "Trace"
            }, _output);

            process.Start();
            return(process);
        }