diff --git a/bin/load_gen b/bin/load_gen index 26032661e617ee2f547a07a4bac5f46c892adc49..599efb8f1eaf77d3aea3d9039d7839368e9a3bd1 100755 --- a/bin/load_gen +++ b/bin/load_gen @@ -281,7 +281,7 @@ function poll() { } // always start out by creating a bunch of users -var NUM_INITIAL_USERS = 1; +var NUM_INITIAL_USERS = 30; // if an explicit target was specified, let's output what that means // in understandable terms diff --git a/lib/load_gen/signup.js b/lib/load_gen/signup.js index 6dd123e40c86714082d229f47b4d5c563dcf88d5..c508976254b5917deb98a1a074a181b72034eb74 100644 --- a/lib/load_gen/signup.js +++ b/lib/load_gen/signup.js @@ -113,11 +113,11 @@ exports.startFunc = function(cfg, cb) { // process wcli.post(cfg, '/wsapi/cert_key', context, { email: email, - pubkey: keypair.publicKey.toSimpleObject() - }, function(r) { - var rv = (r.code === 200 && r.body === '"complete"'); - if (!rv) winston.error("registration_status failed during signup: " + JSON.stringify(r)); - cb(rv); + pubkey: keypair.publicKey.serialize() + }, function(resp) { + if (typeof resp.body !== 'string') return cb(false); + userdb.addCertToUserCtx(context, email, resp.body); + cb(true); }); }); }); diff --git a/lib/load_gen/user_db.js b/lib/load_gen/user_db.js index 6b97f3902b3abb5e1747bc6bd668000023f2fc94..b7c09ce174ded5fc828f40f6daf3ed8f531c3bee 100644 --- a/lib/load_gen/user_db.js +++ b/lib/load_gen/user_db.js @@ -129,6 +129,10 @@ exports.addKeyToUserCtx = function(ctx, email) { // the verifier, but that in turn will drastically increase the // cost of the application of load. ho hum. var k = exports.any(keys.keyPairs); - ctx.keys[email] = k; + ctx.keys[email] = { keyPair: k }; return k; -} +}; + +exports.addCertToUserCtx = function(ctx, email, cert) { + ctx.keys[email].cert = cert; +};