mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-e2e remomte recording path fix
parent
c0f0b0955f
commit
2ed7687ccc
|
@ -24,7 +24,7 @@ node('container') {
|
||||||
sh 'openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -subj "/CN=www.mydom.com/O=My Company LTD./C=US" -keyout openvidu/openvidu-testapp/dist/key.pem -out openvidu/openvidu-testapp/dist/cert.pem'
|
sh 'openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -subj "/CN=www.mydom.com/O=My Company LTD./C=US" -keyout openvidu/openvidu-testapp/dist/key.pem -out openvidu/openvidu-testapp/dist/cert.pem'
|
||||||
sh 'cd openvidu/openvidu-testapp/dist && http-server -S -p 4200 &> ../testapp.log &'
|
sh 'cd openvidu/openvidu-testapp/dist && http-server -S -p 4200 &> ../testapp.log &'
|
||||||
sh 'service kurento-media-server start'
|
sh 'service kurento-media-server start'
|
||||||
sh 'cd openvidu/openvidu-server && mvn -DskipTests=true clean -DskipTests=true compile -DskipTests=true package -DskipTests=true -Dopenvidu.publicurl=https://172.17.0.1:4443/ -Dopenvidu.recording=true -Dopenvidu.recording.path=$PWD/recordings exec:java &> openvidu-server.log &'
|
sh 'cd openvidu/openvidu-server && mvn -DskipTests=true clean -DskipTests=true compile -DskipTests=true package -DskipTests=true -Dopenvidu.publicurl=https://172.17.0.1:4443/ -Dopenvidu.recording=true -Dopenvidu.recording.path=$HOME/openvidu/recordings exec:java &> openvidu-server.log &'
|
||||||
sh 'until $(curl --insecure --output /dev/null --silent --head --fail https://OPENVIDUAPP:MY_SECRET@localhost:4443/); do echo "Waiting for openvidu-server..."; sleep 5; done'
|
sh 'until $(curl --insecure --output /dev/null --silent --head --fail https://OPENVIDUAPP:MY_SECRET@localhost:4443/); do echo "Waiting for openvidu-server..."; sleep 5; done'
|
||||||
}
|
}
|
||||||
stage ('E2E tests') {
|
stage ('E2E tests') {
|
||||||
|
|
|
@ -739,7 +739,8 @@ public class OpenViduTestAppE2eTest {
|
||||||
user.getDriver().findElement(By.id("session-api-btn")).click();
|
user.getDriver().findElement(By.id("session-api-btn")).click();
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
user.getDriver().findElement(By.id("start-recording-btn")).click();
|
user.getDriver().findElement(By.id("start-recording-btn")).click();
|
||||||
user.getWaiter().until(ExpectedConditions.attributeToBe(By.id("api-response-text-area"), "value", "Error [404]"));
|
user.getWaiter()
|
||||||
|
.until(ExpectedConditions.attributeToBe(By.id("api-response-text-area"), "value", "Error [404]"));
|
||||||
user.getDriver().findElement(By.id("close-dialog-btn")).click();
|
user.getDriver().findElement(By.id("close-dialog-btn")).click();
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
|
|
||||||
|
@ -757,27 +758,31 @@ public class OpenViduTestAppE2eTest {
|
||||||
user.getDriver().findElement(By.id("session-api-btn")).click();
|
user.getDriver().findElement(By.id("session-api-btn")).click();
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
user.getDriver().findElement(By.id("start-recording-btn")).click();
|
user.getDriver().findElement(By.id("start-recording-btn")).click();
|
||||||
user.getWaiter().until(ExpectedConditions.attributeToBe(By.id("api-response-text-area"), "value", "Recording started [" + sessionName + "]"));
|
user.getWaiter().until(ExpectedConditions.attributeToBe(By.id("api-response-text-area"), "value",
|
||||||
|
"Recording started [" + sessionName + "]"));
|
||||||
|
|
||||||
user.getEventManager().waitUntilEventReaches("recordingStarted", 1);
|
user.getEventManager().waitUntilEventReaches("recordingStarted", 1);
|
||||||
|
|
||||||
user.getDriver().findElement(By.id("recording-id-field")).clear();
|
user.getDriver().findElement(By.id("recording-id-field")).clear();
|
||||||
user.getDriver().findElement(By.id("recording-id-field")).sendKeys(sessionName);
|
user.getDriver().findElement(By.id("recording-id-field")).sendKeys(sessionName);
|
||||||
user.getDriver().findElement(By.id("stop-recording-btn")).click();
|
user.getDriver().findElement(By.id("stop-recording-btn")).click();
|
||||||
user.getWaiter().until(ExpectedConditions.attributeToBe(By.id("api-response-text-area"), "value", "Recording stopped [" + sessionName + "]"));
|
user.getWaiter().until(ExpectedConditions.attributeToBe(By.id("api-response-text-area"), "value",
|
||||||
|
"Recording stopped [" + sessionName + "]"));
|
||||||
|
|
||||||
user.getEventManager().waitUntilEventReaches("recordingStopped", 1);
|
user.getEventManager().waitUntilEventReaches("recordingStopped", 1);
|
||||||
|
|
||||||
File file1 = new File(System.getProperty("user.dir") + "/recordings/" + sessionName + ".mp4");
|
File file1 = new File(recordingsPath + sessionName + ".mp4");
|
||||||
File file2 = new File(System.getProperty("user.dir") + "/recordings/.recording." + sessionName);
|
File file2 = new File(recordingsPath + ".recording." + sessionName);
|
||||||
File file3 = new File(System.getProperty("user.dir") + "/recordings/" + sessionName + ".info");
|
File file3 = new File(recordingsPath + sessionName + ".info");
|
||||||
|
|
||||||
Assert.assertFalse(!file1.exists() || file1.length() == 0);
|
System.out.println(file1.getAbsolutePath());
|
||||||
Assert.assertFalse(!file2.exists() || file2.length() == 0);
|
Assert.assertTrue(file1.exists() || file1.length() > 0);
|
||||||
Assert.assertFalse(!file3.exists() || file3.length() == 0);
|
Assert.assertTrue(file2.exists() || file2.length() > 0);
|
||||||
|
Assert.assertTrue(file3.exists() || file3.length() > 0);
|
||||||
|
|
||||||
user.getDriver().findElement(By.id("delete-recording-btn")).click();
|
user.getDriver().findElement(By.id("delete-recording-btn")).click();
|
||||||
user.getWaiter().until(ExpectedConditions.attributeToBe(By.id("api-response-text-area"), "value", "Recording deleted"));
|
user.getWaiter()
|
||||||
|
.until(ExpectedConditions.attributeToBe(By.id("api-response-text-area"), "value", "Recording deleted"));
|
||||||
|
|
||||||
Assert.assertFalse(file1.exists());
|
Assert.assertFalse(file1.exists());
|
||||||
Assert.assertFalse(file2.exists());
|
Assert.assertFalse(file2.exists());
|
||||||
|
@ -791,8 +796,8 @@ public class OpenViduTestAppE2eTest {
|
||||||
return new ExpectedCondition<Boolean>() {
|
return new ExpectedCondition<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public Boolean apply(WebDriver input) {
|
public Boolean apply(WebDriver input) {
|
||||||
return element.getAttribute("duration")
|
return element.getAttribute("duration").matches(
|
||||||
.matches(durationInSeconds - 1 + "\\.[8-9][0-9]{0,5}|" + durationInSeconds + "\\.[0-2][0-9]{0,5}");
|
durationInSeconds - 1 + "\\.[8-9][0-9]{0,5}|" + durationInSeconds + "\\.[0-2][0-9]{0,5}");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue