예제 #1
0
 async void CopyCloneToS3(WebhookEvent webhookEvent)
 {
     using (GitProxy gitProxy = new GitProxy(webhookEvent, "gitlab_pwd", $"gitlab-gitlab-codebuild-integration", webhookEvent.CommitId))
     {
         HttpStatusCode statusCode = await gitProxy.UploadSourceAsync();
     }
 }
예제 #2
0
 public ProjectAnalyzer(ProgramConfiguration configuration, MongoProxy mongoProxy, GitProxy gitProxy, GoogleProxy googleProxy,
                        AliasReader aliasReader, ILogger <ProjectAnalyzer> logger)
 {
     _configuration = configuration;
     _mongoProxy    = mongoProxy;
     _gitProxy      = gitProxy;
     _googleProxy   = googleProxy;
     _aliasReader   = aliasReader;
     _logger        = logger;
 }
예제 #3
0
        public void SetRemoteOrigin_WhenCalled_SendsTcpMessage()
        {
            bool methodCalled = false;
            TestableCollabProxyClient theClient = new TestableCollabProxyClient();

            TestHelper.RegisterListener("setremoteorigin", val => { methodCalled = true; });
            IGitProxy theProxy = new GitProxy(theClient);

            // Make sure nothing happened up to this point
            Assert.IsFalse(methodCalled);
            theProxy.SetRemoteOrigin("");
            Assert.IsTrue(methodCalled);
        }
예제 #4
0
        public void InitializeRepository_WhenCalled_SendsTcpMessage()
        {
            bool methodCalled = false;
            TestableCollabProxyClient theClient = new TestableCollabProxyClient();

            TestHelper.RegisterListener("initializerepository", val => { methodCalled = true; });
            IGitProxy theProxy = new GitProxy(theClient);

            // Make sure nothing happened up to this point
            Assert.IsFalse(methodCalled);
            theProxy.InitializeRepository();
            Assert.IsTrue(methodCalled);
        }
예제 #5
0
        public void GetWorkingDirectoryChangesAsync_WhenCalled_SendsTcpMessage()
        {
            var methodCalled = false;
            var resetHandle  = new ManualResetEvent(false);

            TestHelper.RegisterListener("GetWorkingDirectoryChangesAsync".ToLower(), val =>
            {
                methodCalled = true;
                resetHandle.Set();
            });
            var theClient = new TestableCollabProxyClient();

            theClient.StartOrConnectToServer();
            IGitProxy theProxy = new GitProxy(theClient);

            // Make sure nothing happened up to this point
            Assert.IsFalse(methodCalled);
            theProxy.GetWorkingDirectoryChangesAsync();
            resetHandle.WaitOne();
            Assert.IsTrue(methodCalled);
        }
예제 #6
0
 /// <summary>
 /// Create a new instance of CollabVersionControl, consisting of a CollabProxyClient and GitProxy
 /// </summary>
 public CollabVersionControl()
 {
     m_CollabProxyClient = new CollabProxyClient();
     Git = new GitProxy(m_CollabProxyClient);
     RegisterServerCallbacks();
 }