public void FindByIdTest() { DeploymentStore store = new DeploymentStore(); Deployment pi = store.FindById(Guid.NewGuid()); Assert.IsNull(pi); store.Dispose(); }
public void DeploymentStoreTest1() { using (BpmDbContext db = new BpmDbContext()) { DeploymentStore store = new DeploymentStore(db); Assert.IsNotNull(store); } }
public void MultipleSelect() { DeploymentStore store = new DeploymentStore(); Deployment pi = new Deployment() { DeploymentCategory = "DeploymentCategory", DeploymentTenantId = "DeploymentTenantId", DeploymentVersion = "1.0" }; store.Create(pi); Deployment pi2 = store.FindById(pi.DeploymentId); Deployment pi3 = store.FindById(pi.DeploymentId); Deployment pi4 = store.FindById(pi.DeploymentId); }
public void CRUDTest() { DeploymentStore store = new DeploymentStore(); Deployment pi = new Deployment() { DeploymentCategory = "DeploymentCategory", DeploymentTenantId = "DeploymentTenantId", DeploymentVersion = "1.0" }; store.Create(pi); pi.DeploymentCategory = "DeploymentCategory2"; store.Update(pi); store.Delete(pi); store.Dispose(); }
private dynamic WebhookTrigger(dynamic o) { string secret = o.secret; int buildid = o.buildid; log.Debug("Received hook with secret " + secret + " for build ID " + buildid); if (secret != Env.WEBHOOK_SECRET) { log.Warn("Secret " + secret + " is invalid, ignoring."); return(HttpStatusCode.Unauthorized); } Task.Run(() => { DeploymentStore.StartTravisDeployment(buildid); }); return(HttpStatusCode.OK); }
public static void Main(string[] args) { BasicConfigurator.Configure(); Nancy.Json.JsonSettings.MaxJsonLength = int.MaxValue; log.Info("Initializing..."); // Disable ssl verification ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true; if (!Kubernetes.IsKubernetes) { log.Warn("KubeDeploy cannot run without Kubernetes."); return; } if (!Kubernetes.CheckKubernetesConnection()) { log.Warn("Kubernetes connection check failed."); return; } DeploymentStore.Initialize(); var exitEvent = new ManualResetEvent(false); log.Debug("Initializing web host..."); using (WebApp.Start <Startup>("http://+:8080")) { Console.CancelKeyPress += (sender, eventArgs) => { eventArgs.Cancel = true; exitEvent.Set(); }; exitEvent.WaitOne(); } log.Debug("Exiting..."); }
public void DeploymentStoreTest() { DeploymentStore store = new DeploymentStore(); Assert.IsNotNull(store); }