Esempio n. 1
0
        public async Task TestRequestNewJob()
        {
            string controllerEndpoint = "https://localhost:44379/";

            WorkersConnector connector = WorkersConnector.GetConnector(controllerEndpoint);

            string workerName = "RegTestWorker";

            var result = await connector.RequestNewJob(workerName);

            Assert.IsTrue(result.Success, result.Message);
        }
Esempio n. 2
0
        public async Task TestPostStatus()
        {
            string controllerEndpoint = "https://localhost:44379/";

            WorkersConnector connector = WorkersConnector.GetConnector(controllerEndpoint);

            SystemStatus status = new SystemStatus("RegtestEngine");

            status.Attributes.AddRange(new SystemStatusAttribute[] {
                new SystemStatusAttribute("IsAlive", true.ToString(), SystemStatusLevel.GREEN),
                new SystemStatusAttribute("IsConnectedToIB", false.ToString(), SystemStatusLevel.RED)
            });

            var result = await connector.PostStatus("regtestWorker", status);

            Assert.IsNotNull(result);
        }