示例#1
0
 public CheckPullRequestsAfterNewSignatureJob(ILogger <CheckPullRequestsAfterNewSignatureJob> logger,
                                              NotificationsEnabledDb database, IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
 public RefreshLFSProjectFilesJob(ILogger <RefreshLFSProjectFilesJob> logger, NotificationsEnabledDb database,
                                  ILocalTempFileLocks localTempFileLocks)
 {
     this.logger             = logger;
     this.database           = database;
     this.localTempFileLocks = localTempFileLocks;
 }
        public async Task Registration_FailsOnInvalidCSRF(string csrfValue)
        {
            var csrfMock = new Mock <ITokenVerifier>();

            csrfMock.Setup(csrf => csrf.IsValidCSRFToken(csrfValue, null, false))
            .Returns(false).Verifiable();

            var notificationsMock = new Mock <IModelUpdateNotificationSender>();
            var jobClientMock     = new Mock <IBackgroundJobClient>();

            await using var database = new NotificationsEnabledDb(dbOptions, notificationsMock.Object);

            var controller = new RegistrationController(logger, dummyRegistrationStatus, csrfMock.Object, database,
                                                        jobClientMock.Object);

            var result = await controller.Post(new RegistrationFormData()
            {
                CSRF             = csrfValue, Email = "*****@*****.**", Name = "test", Password = "******",
                RegistrationCode = RegistrationCode
            });

            var objectResult = Assert.IsAssignableFrom <ObjectResult>(result);

            Assert.Equal(400, objectResult.StatusCode);
            Assert.Empty(database.Users);

            csrfMock.Verify();
        }
 public LockCIImageItemJob(ILogger <LockCIImageItemJob> logger, NotificationsEnabledDb database,
                           IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
 public SetFinishedCIJobStatusJob(ILogger <SetFinishedCIJobStatusJob> logger, NotificationsEnabledDb database,
                                  IBackgroundJobClient jobClient, IGithubCommitStatusReporter statusReporter) : base(logger, database,
                                                                                                                     jobClient, statusReporter)
 {
     this.logger   = logger;
     this.database = database;
 }
 public CheckAutoCommentsToPostJob(ILogger <CheckAutoCommentsToPostJob> logger, NotificationsEnabledDb database,
                                   IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
示例#7
0
 public LogoutController(ILogger <LogoutController> logger, NotificationsEnabledDb database,
                         ITokenVerifier csrfVerifier)
 {
     this.logger       = logger;
     this.database     = database;
     this.csrfVerifier = csrfVerifier;
 }
 public RefreshPatronsJob(ILogger <RefreshPatronsJob> logger, NotificationsEnabledDb database,
                          IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
 public CheckCIJobOutputHasConnectedJob(ILogger <CheckCIJobOutputHasConnectedJob> logger,
                                        NotificationsEnabledDb database, IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
示例#10
0
 public DeleteStorageItemVersionJob(ILogger <DeleteStorageItemVersionJob> logger, NotificationsEnabledDb database,
                                    GeneralRemoteStorage remoteStorage)
 {
     this.logger        = logger;
     this.database      = database;
     this.remoteStorage = remoteStorage;
 }
 public InvalidatePullRequestsWithCLASignaturesJob(ILogger <InvalidatePullRequestsWithCLASignaturesJob> logger,
                                                   NotificationsEnabledDb database, IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
 public DetectStuckServersJob(ILogger <DetectStuckServersJob> logger, NotificationsEnabledDb database,
                              IEC2Controller ec2Controller)
 {
     this.logger        = logger;
     this.database      = database;
     this.ec2Controller = ec2Controller;
 }
示例#13
0
 public CIBuildManagementController(ILogger<CIBuildManagementController> logger, NotificationsEnabledDb database,
     IBackgroundJobClient jobClient)
 {
     this.logger = logger;
     this.database = database;
     this.jobClient = jobClient;
 }
 public LauncherController(ILogger <LauncherController> logger, NotificationsEnabledDb database,
                           IGeneralRemoteDownloadUrls remoteDownloads)
 {
     this.logger          = logger;
     this.database        = database;
     this.remoteDownloads = remoteDownloads;
 }
 public DeleteDebugSymbolIfUploadFailedJob(ILogger <DeleteDebugSymbolIfUploadFailedJob> logger,
                                           NotificationsEnabledDb database, IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
 public UserManagementController(ILogger <UserManagementController> logger,
                                 NotificationsEnabledDb database, IHubContext <NotificationsHub, INotifications> notifications)
 {
     this.logger        = logger;
     this.database      = database;
     this.notifications = notifications;
 }
示例#17
0
 public CloseAutoClosePollJob(ILogger <CloseAutoClosePollJob> logger, NotificationsEnabledDb database,
                              IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
示例#18
0
 public DeleteCrashReportDumpJob(ILogger <DeleteCrashReportDumpJob> logger, NotificationsEnabledDb database,
                                 ILocalTempFileLocks localTempFileLocks)
 {
     this.logger             = logger;
     this.database           = database;
     this.localTempFileLocks = localTempFileLocks;
 }
示例#19
0
 public LFSProjectController(ILogger <LFSProjectController> logger, NotificationsEnabledDb database,
                             IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
示例#20
0
 public SetCLAGithubCommitStatusJob(ILogger <SetCLAGithubCommitStatusJob> logger, NotificationsEnabledDb database,
                                    IGithubCommitStatusReporter statusReporter)
 {
     this.logger         = logger;
     this.database       = database;
     this.statusReporter = statusReporter;
 }
示例#21
0
 public DevBuildsController(ILogger <DevBuildsController> logger, NotificationsEnabledDb database,
                            DiscordNotifications discordNotifications)
 {
     this.logger               = logger;
     this.database             = database;
     this.discordNotifications = discordNotifications;
 }
示例#22
0
 public GithubWebhookController(ILogger <GithubWebhookController> logger, NotificationsEnabledDb database,
                                IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
示例#23
0
 public DeleteOldDisabledSymbolsJob(ILogger <DeleteOldDisabledSymbolsJob> logger, NotificationsEnabledDb database,
                                    IBackgroundJobClient jobClient)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
 }
 protected BaseCIJobManagingJob(ILogger <BaseCIJobManagingJob> logger, NotificationsEnabledDb database,
                                IBackgroundJobClient jobClient, IGithubCommitStatusReporter statusReporter)
 {
     Logger         = logger;
     Database       = database;
     JobClient      = jobClient;
     StatusReporter = statusReporter;
 }
示例#25
0
 public WaitForExternalServerStartUpJob(ILogger <WaitForExternalServerStartUpJob> logger,
                                        NotificationsEnabledDb database, IBackgroundJobClient jobClient, IExternalServerSSHAccess sshAccess)
 {
     this.logger    = logger;
     this.database  = database;
     this.jobClient = jobClient;
     this.sshAccess = sshAccess;
 }
 public ProvisionControlledServerJob(ILogger <ProvisionControlledServerJob> logger,
                                     NotificationsEnabledDb database, IEC2Controller ec2Controller, IBackgroundJobClient jobClient,
                                     IControlledServerSSHAccess sshAccess) : base(logger, database)
 {
     this.ec2Controller = ec2Controller;
     this.jobClient     = jobClient;
     this.sshAccess     = sshAccess;
 }
示例#27
0
 public CheckPullRequestStatusJob(ILogger <CheckPullRequestStatusJob> logger, NotificationsEnabledDb database,
                                  IBackgroundJobClient jobClient, ICLAExemptions claExemptions)
 {
     this.logger        = logger;
     this.database      = database;
     this.jobClient     = jobClient;
     this.claExemptions = claExemptions;
 }
 public ControlledServersController(ILogger <ControlledServersController> logger,
                                    NotificationsEnabledDb database, IEC2Controller ec2Controller, IBackgroundJobClient jobClient)
 {
     this.logger        = logger;
     this.database      = database;
     this.ec2Controller = ec2Controller;
     this.jobClient     = jobClient;
 }
示例#29
0
 public ExternalServersController(ILogger <ExternalServersController> logger, NotificationsEnabledDb database,
                                  IExternalServerSSHAccess serverSSHAccess, IBackgroundJobClient jobClient)
 {
     this.logger          = logger;
     this.database        = database;
     this.serverSSHAccess = serverSSHAccess;
     this.jobClient       = jobClient;
 }
 public HandleControlledServerJobsJob(ILogger <HandleControlledServerJobsJob> logger,
                                      NotificationsEnabledDb database, RemoteServerHandler serverHandler,
                                      IBackgroundJobClient jobClient)
 {
     this.logger        = logger;
     this.database      = database;
     this.serverHandler = serverHandler;
     this.jobClient     = jobClient;
 }