mirror of
https://github.com/Netflix/dial-reference.git
synced 2026-06-08 10:59:59 +00:00
rectify error in sending clientDialVer in application status query
This commit is contained in:
@@ -47,7 +47,7 @@ function getApplicationStatus(host, app, clientDialVer) {
|
||||
return new Q()
|
||||
.then(constructAppResourceUrl.bind(null, host, app))
|
||||
.then(function (appResourceUrl) {
|
||||
appResourceUrl += clientDialVer === "2.1" ? "?clientDialVer='2.1'" : "";
|
||||
appResourceUrl += clientDialVer === "2.1" ? "?clientDialVer=2.1" : "";
|
||||
return appResourceUrl;
|
||||
})
|
||||
.then(function (appResourceUrl) {
|
||||
|
||||
@@ -52,6 +52,7 @@ function test() {
|
||||
if(result.state !== "running") {
|
||||
return Q.reject(new Error("Expected " + app + " app status to be running but the state was " + result.state));
|
||||
}
|
||||
console.log("app was running");
|
||||
})
|
||||
.then(dial.hideApplication.bind(null, host, app))
|
||||
.delay(timeToWaitForStateChange);
|
||||
@@ -60,7 +61,9 @@ function test() {
|
||||
.delay(timeToWaitForStateChange);
|
||||
}
|
||||
})
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function checkAppStatus(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Could not retrieve current " + app + " application state"));
|
||||
|
||||
@@ -63,7 +63,9 @@ function test() {
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function checkAppStatus(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Error retrieving current " + app + " application state"));
|
||||
|
||||
@@ -63,7 +63,9 @@ function test() {
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function checkAppStatus(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Error retrieving current " + app + " application state"));
|
||||
|
||||
@@ -53,7 +53,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function getCurrentAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Error retrieving current " + app + " application state"));
|
||||
|
||||
@@ -53,7 +53,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function getCurrentAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Error retrieving current " + app + " application state"));
|
||||
|
||||
@@ -51,7 +51,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function checkAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject("Error retrieving " + app + " application state");
|
||||
@@ -71,7 +73,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function getCurrentAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Error retrieving current " + app + " application state"));
|
||||
|
||||
@@ -51,7 +51,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function checkAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject("Error retrieving " + app + " application state");
|
||||
@@ -71,7 +73,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function getCurrentAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Error retrieving current " + app + " application state"));
|
||||
|
||||
@@ -61,7 +61,9 @@ function test() {
|
||||
.delay(timeToWaitForStateChange);
|
||||
}
|
||||
})
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function checkAppStatus(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Could not retrieve current " + app + " application state"));
|
||||
@@ -78,7 +80,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function checkAppStatus(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Could not retrieve current " + app + " application state"));
|
||||
|
||||
@@ -53,7 +53,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function getCurrentAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Error retrieving current " + app + " application state"));
|
||||
@@ -70,7 +72,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function getCurrentAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Error retrieving current " + app + " application state"));
|
||||
|
||||
@@ -64,7 +64,9 @@ function test() {
|
||||
return new Q()
|
||||
.then(dial.launchApplication.bind(null, host, app))
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function getCurrentAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Could not retrieve current " + app + " application state"));
|
||||
@@ -97,7 +99,9 @@ function test() {
|
||||
}
|
||||
})
|
||||
.delay(timeToWaitForStateChange)
|
||||
.then(dial.getApplicationStatus.bind(null, host, app))
|
||||
.then(function () {
|
||||
return dial.getApplicationStatus(host, app)
|
||||
})
|
||||
.then(function getCurrentAppState(result) {
|
||||
if(!result || !result.state) {
|
||||
return Q.reject(new Error("Could not retrieve current " + app + " application state"));
|
||||
|
||||
Reference in New Issue
Block a user