Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Revert "[WIP] Add TTL to mirrors collection"
Browse files Browse the repository at this point in the history
  • Loading branch information
braydonf committed Aug 5, 2017
1 parent b57425d commit 544cf14
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
7 changes: 0 additions & 7 deletions lib/models/mirror.js
Expand Up @@ -3,18 +3,11 @@
const mongoose = require('mongoose');
const SchemaOptions = require('../options');

const MIRROR_TTL_SECONDS = 604800; // one week

/**
* Represents a pool of contacts who can mirror a shard
* @constructor
*/
var Mirror = new mongoose.Schema({
created: {
type: Date,
default: Date.now,
expires: MIRROR_TTL_SECONDS
},
shardHash: {
type: String,
required: true
Expand Down
5 changes: 1 addition & 4 deletions test/contact.unit.js
Expand Up @@ -297,11 +297,8 @@ describe('Storage/models/Contact', function() {
describe('#toObject', function() {

it('should contain specified properties + virtuals', function(done) {
const contact = new Contact({
_id: storj.KeyPair().getNodeID()
});
const contact = new Contact({});
const contactKeys = Object.keys(contact.toObject());

expect(contactKeys).to.contain('nodeID');
expect(contactKeys).to.not.contain('__v', '_id', 'id');
done();
Expand Down

0 comments on commit 544cf14

Please sign in to comment.