Skip to content

Commit

Permalink
Remove key-spacing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
almet committed Feb 16, 2015
1 parent 0545d70 commit 9f260b1
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 73 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,3 @@ rules:
"no-path-concat": 0
"no-process-exit": 0
"eol-last": 2
"key-spacing": 0
94 changes: 47 additions & 47 deletions test/functional_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,49 +1031,49 @@ function runOnPrefix(apiPrefix) {
beforeEach(function(done) {
calls = [
{
callId: randomBytes(16).toString("hex"),
wsCallerToken: randomBytes(16).toString("hex"),
wsCalleeToken: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userHmac,
apiKey: tokBoxConfig.credentials.default.apiKey,
sessionId: fakeCallInfo.session1,
calleeToken: fakeCallInfo.token1,
callToken: callToken,
callType: 'audio',
callId: randomBytes(16).toString("hex"),
wsCallerToken: randomBytes(16).toString("hex"),
wsCalleeToken: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userHmac,
apiKey: tokBoxConfig.credentials.default.apiKey,
sessionId: fakeCallInfo.session1,
calleeToken: fakeCallInfo.token1,
callToken: callToken,
callType: 'audio',
urlCreationDate: urlCreationDate,
callState: constants.CALL_STATES.INIT,
timestamp: parseInt(Date.now() / 1000, 10)
callState: constants.CALL_STATES.INIT,
timestamp: parseInt(Date.now() / 1000, 10)
},
{
callId: randomBytes(16).toString("hex"),
wsCallerToken: randomBytes(16).toString("hex"),
wsCalleeToken: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userHmac,
apiKey: tokBoxConfig.credentials.default.apiKey,
sessionId: fakeCallInfo.session2,
calleeToken: fakeCallInfo.token2,
callToken: callToken,
callType: 'audio-video',
callId: randomBytes(16).toString("hex"),
wsCallerToken: randomBytes(16).toString("hex"),
wsCalleeToken: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userHmac,
apiKey: tokBoxConfig.credentials.default.apiKey,
sessionId: fakeCallInfo.session2,
calleeToken: fakeCallInfo.token2,
callToken: callToken,
callType: 'audio-video',
urlCreationDate: urlCreationDate,
callState: constants.CALL_STATES.INIT,
timestamp: parseInt(Date.now() / 1000, 10) + 1
callState: constants.CALL_STATES.INIT,
timestamp: parseInt(Date.now() / 1000, 10) + 1
},
{
callId: randomBytes(16).toString("hex"),
wsCallerToken: randomBytes(16).toString("hex"),
wsCalleeToken: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userHmac,
apiKey: tokBoxConfig.credentials.default.apiKey,
sessionId: fakeCallInfo.session3,
calleeToken: fakeCallInfo.token2,
callState: constants.CALL_STATES.TERMINATED,
callToken: callToken,
callType: 'audio-video',
callId: randomBytes(16).toString("hex"),
wsCallerToken: randomBytes(16).toString("hex"),
wsCalleeToken: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userHmac,
apiKey: tokBoxConfig.credentials.default.apiKey,
sessionId: fakeCallInfo.session3,
calleeToken: fakeCallInfo.token2,
callState: constants.CALL_STATES.TERMINATED,
callToken: callToken,
callType: 'audio-video',
urlCreationDate: urlCreationDate,
timestamp: parseInt(Date.now() / 1000, 10) + 2
timestamp: parseInt(Date.now() / 1000, 10) + 2
}
];

Expand Down Expand Up @@ -1152,17 +1152,17 @@ function runOnPrefix(apiPrefix) {

it("shouldn't list callToken and urls for a direct call", function(done) {
var call = {
callId: randomBytes(16).toString("hex"),
wsCallerToken: randomBytes(16).toString("hex"),
wsCalleeToken: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userHmac,
apiKey: tokBoxConfig.credentials.default.apiKey,
sessionId: fakeCallInfo.session3,
calleeToken: fakeCallInfo.token2,
callState: constants.CALL_STATES.INIT,
callType: 'audio-video',
timestamp: parseInt(Date.now() / 1000, 10) + 3
callId: randomBytes(16).toString("hex"),
wsCallerToken: randomBytes(16).toString("hex"),
wsCalleeToken: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userHmac,
apiKey: tokBoxConfig.credentials.default.apiKey,
sessionId: fakeCallInfo.session3,
calleeToken: fakeCallInfo.token2,
callState: constants.CALL_STATES.INIT,
callType: 'audio-video',
timestamp: parseInt(Date.now() / 1000, 10) + 3
};

req = supertest(app)
Expand Down
48 changes: 24 additions & 24 deletions test/storage_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,47 +35,47 @@ describe("Storage", function() {
a_second = 1 / 3600, // A second in hours.
calls = [
{
callId: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userMac,
sessionId: fakeCallInfo.session1,
calleeToken: fakeCallInfo.token1,
callState: constants.CALL_STATES.INIT,
timestamp: now - 3
callId: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userMac,
sessionId: fakeCallInfo.session1,
calleeToken: fakeCallInfo.token1,
callState: constants.CALL_STATES.INIT,
timestamp: now - 3
},
{
callId: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userMac,
sessionId: fakeCallInfo.session2,
calleeToken: fakeCallInfo.token2,
callState: constants.CALL_STATES.INIT,
timestamp: now - 2
callId: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userMac,
sessionId: fakeCallInfo.session2,
calleeToken: fakeCallInfo.token2,
callState: constants.CALL_STATES.INIT,
timestamp: now - 2
},
{
callId: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userMac,
sessionId: fakeCallInfo.session3,
calleeToken: fakeCallInfo.token2,
callState: constants.CALL_STATES.TERMINATED,
timestamp: now - 1
callId: randomBytes(16).toString("hex"),
callerId: callerId,
userMac: userMac,
sessionId: fakeCallInfo.session3,
calleeToken: fakeCallInfo.token2,
callState: constants.CALL_STATES.TERMINATED,
timestamp: now - 1
}
],
call = calls[0],
urls = [
{
timestamp: now,
timestamp: now,
expires: now + callUrls.timeout,
userMac: userMac
},
{
timestamp: now + 1,
timestamp: now + 1,
expires: now + callUrls.timeout,
userMac: userMac
},
{
timestamp: now + 2,
timestamp: now + 2,
expires: now + callUrls.timeout,
userMac: userMac
}
Expand Down
2 changes: 1 addition & 1 deletion test/tokbox_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("TokBox", function() {

new TokBox({
credentials: {
default : {
default: {
apiKey: apiKey,
apiSecret: apiSecret
}
Expand Down

0 comments on commit 9f260b1

Please sign in to comment.