Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
czechboy0 committed Oct 14, 2015
1 parent 6e14a88 commit 7f048c5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions BuildaKitTests/SyncPair_PR_Bot_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SyncPair_PR_Bot_Tests: XCTestCase {
let (pr, bot, commit) = self.mockedPRAndBotAndCommit()
let integrations = [Integration]()

let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, integrations: integrations)
let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", integrations: integrations)
XCTAssertEqual(actions.integrationsToCancel?.count ?? 0, 0)
XCTBAssertNil(actions.githubStatusToSet)
XCTAssertNotNil(actions.startNewIntegrationBot)
Expand All @@ -54,7 +54,7 @@ class SyncPair_PR_Bot_Tests: XCTestCase {
MockIntegration(number: 1, step: Integration.Step.Pending)
]

let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, integrations: integrations)
let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", integrations: integrations)
XCTAssertEqual(actions.integrationsToCancel?.count ?? 0, 0)
XCTAssertNil(actions.startNewIntegrationBot)
XCTBAssertNotNil(actions.githubStatusToSet)
Expand All @@ -70,7 +70,7 @@ class SyncPair_PR_Bot_Tests: XCTestCase {
MockIntegration(number: 3, step: Integration.Step.Pending)
]

let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, integrations: integrations)
let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", integrations: integrations)

//should cancel all except for the last one
let toCancel = Set(actions.integrationsToCancel!)
Expand All @@ -89,7 +89,7 @@ class SyncPair_PR_Bot_Tests: XCTestCase {
MockIntegration(number: 1, step: Integration.Step.Building),
]

let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, integrations: integrations)
let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", integrations: integrations)

XCTAssertEqual(actions.integrationsToCancel!.count, 0)
XCTAssertNil(actions.startNewIntegrationBot)
Expand All @@ -104,7 +104,7 @@ class SyncPair_PR_Bot_Tests: XCTestCase {
MockIntegration(number: 1, step: Integration.Step.Completed, sha: "head_sha", result: Integration.Result.TestFailures)
]

let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, integrations: integrations)
let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", integrations: integrations)

XCTAssertEqual(actions.integrationsToCancel!.count, 0)
XCTAssertNil(actions.startNewIntegrationBot)
Expand All @@ -119,7 +119,7 @@ class SyncPair_PR_Bot_Tests: XCTestCase {
MockIntegration(number: 1, step: Integration.Step.Completed, sha: "head_sha", result: Integration.Result.Succeeded)
]

let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, integrations: integrations)
let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", integrations: integrations)

XCTAssertEqual(actions.integrationsToCancel!.count, 0)
XCTAssertNil(actions.startNewIntegrationBot)
Expand All @@ -135,7 +135,7 @@ class SyncPair_PR_Bot_Tests: XCTestCase {
MockIntegration(number: 2, step: Integration.Step.Pending, sha: "head_sha")
]

let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, integrations: integrations)
let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", integrations: integrations)

XCTAssertEqual(actions.integrationsToCancel!.count, 1)
XCTAssertNil(actions.startNewIntegrationBot)
Expand All @@ -150,7 +150,7 @@ class SyncPair_PR_Bot_Tests: XCTestCase {
MockIntegration(number: 1, step: Integration.Step.Building, sha: "head_sha_old"),
]

let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, integrations: integrations)
let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", integrations: integrations)

XCTAssertEqual(actions.integrationsToCancel!.count, 1)
XCTAssertNotNil(actions.startNewIntegrationBot)
Expand Down

0 comments on commit 7f048c5

Please sign in to comment.