-
Notifications
You must be signed in to change notification settings - Fork 254
Expand file tree
/
Copy pathtest-utils.js
More file actions
25 lines (20 loc) · 815 Bytes
/
test-utils.js
File metadata and controls
25 lines (20 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const { config } = require('../../../../../lib/Config');
let describeSkipIfNotMultiple = describe.skip;
if (config.backends.data === 'multiple') {
describeSkipIfNotMultiple = describe;
}
function hasLocation(lc) {
return config.locationConstraints[lc] !== undefined;
}
/**
* We consider cold storage & restore supported if Transition lifecycle rule is supported.
* In our implementation, it's the only way to move objects to cold storage (can't write directly to cold)
* Even if Transition could be used without cold storage location (hot transition), but both features are
* enabled together at the moment.
*/
const hasColdStorage = config.supportedLifecycleRules.some(rule => rule.endsWith('Transition'));
module.exports = {
describeSkipIfNotMultiple,
hasLocation,
hasColdStorage,
};