Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix, Test requestUtil prefs/device; add helpers #19

Merged
merged 1 commit into from Dec 23, 2016

Conversation

@ayumi
Copy link
Contributor

ayumi commented Dec 23, 2016

Auditors: @diracdeltas

@ayumi ayumi requested a review from diracdeltas Dec 23, 2016
@@ -121,7 +121,7 @@ const maybeSetDeviceId = () => {
if (!requester.s3) {
throw new Error('cannot set device ID because AWS SDK is not initialized.')
}
return requester.list(proto.categories.PREFERENCES)
return requester.list(proto.categories.wS)

This comment has been minimized.

Copy link
@diracdeltas

diracdeltas Dec 23, 2016

Member

wat is wS?

This comment has been minimized.

Copy link
@ayumi

ayumi Dec 23, 2016

Author Contributor

oops typo

@@ -53,7 +53,7 @@ const logSync = (message, logLevel = DEBUG) => {
* @returns {Object}
*/
const decrypt = (ciphertext) => {
const d = clientSerializer.byteArrayToSecretBoxRecord(ciphertext)
const d = clientSerializer.byteArrayToSecretboxRecord(ciphertext)

This comment has been minimized.

Copy link
@diracdeltas

diracdeltas Dec 23, 2016

Member

oops good catch

t.test('#put preference: device', (t) => {
t.plan(2)
const deviceId = new Uint8Array([0])
const name = 'alpha pyramid'

This comment has been minimized.

Copy link
@diracdeltas
@@ -1,7 +1,8 @@
'use strict'

const awsSdk = require('aws-sdk')
const crc32 = require('buffer-crc32')
const crc = require('crc')
const s3Helper = require('../lib/s3Helper')

// Max size of a record in bytes. Limited by s3 key size.
const MAX_RECORD_SIZE = 900

This comment has been minimized.

Copy link
@diracdeltas

diracdeltas Dec 23, 2016

Member

should this be smaller now that the encoding is more chars?

@diracdeltas
Copy link
Member

diracdeltas commented Dec 23, 2016

fixes to be done in follow ups

@diracdeltas diracdeltas merged commit d8ad327 into staging Dec 23, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.