Code Duplication    Length = 11-12 lines in 2 locations

tests/SmokeTestPipelineStepTest.php 2 locations

@@ 27-38 (lines=12) @@
24
	/**
25
	 * Test successful smoke test
26
	 */
27
	public function testSmokeTestPass() {
28
		$this->markTestSkipped("Failing sporadically");
29
		return;
30
31
		$step = $this->getDummySmokeTestStep('SmokeTest');
32
		$this->assertTrue($step->start());
33
		$this->assertHasLog('Starting smoke test "Videos" to URL http://www.youtube.com/');
34
		$this->assertHasLog('Smoke test "Videos" to URL http://www.youtube.com/ successful');
35
		$this->assertHasLog('Starting smoke test "Home" to URL https://github.com/');
36
		$this->assertHasLog('Smoke test "Home" to URL https://github.com/ successful');
37
		$this->assertEquals('Finished', $step->Status);
38
	}
39
40
	/**
41
	 * Test failed smoke test
@@ 43-53 (lines=11) @@
40
	/**
41
	 * Test failed smoke test
42
	 */
43
	public function testSmokeTestFail() {
44
		// the testsmokefaile yml config contains a invalid smoketest url
45
		// which is how it fails
46
		$step = $this->getDummySmokeTestStep('FailTest');
47
		$this->assertFalse($step->start());
48
		$this->assertHasLog('Starting smoke test "BrokenPage" to URL http://bob.bob.bob.bob/');
49
		$this->assertHasLog('Curl error: ');
50
		$this->assertHasLog('Starting smoke test "Home" to URL https://github.com/');
51
		$this->assertHasLog('Smoke test "Home" to URL https://github.com/ successful');
52
		$this->assertEquals('Failed', $step->Status);
53
	}
54
55
	public function testReattempts() {
56
		// the testsmokefaile yml config contains a invalid smoketest url which is how it fails