Skip to content

Commit 01ffa6e

Browse files
committed
replaced random-words per math.random
Signed-off-by: Rod Anami <[email protected]>
1 parent 4b6d193 commit 01ffa6e

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

container/docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ services:
1818
- IPC_LOCK
1919
entrypoint: vault server -config=/vault/config/vault.hcl
2020
extra_hosts:
21-
- "ldap.chatopsknight.com:10.88.0.11"
21+
- "ldap.chatopsknight.com:10.88.0.2"
2222

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
"transform": {
7575
"^.+\\.ts?$": "ts-jest"
7676
},
77+
"transformIgnorePatterns": [
78+
"node_modules/(?!variables/.*)"
79+
],
7780
"testRegex": "/tests/.*\\.(test|spec)?\\.(js|ts|tsx)$",
7881
"moduleFileExtensions": [
7982
"ts",

tests/KV.test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
const Vault = require('../Vault');
2-
const randomWords = require('random-words');
32

4-
const RandName = randomWords({ exactly: 1, wordsPerString: 2, separator:'-' });
3+
const ABC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
4+
const RandName = Array(10).join().split(',').map(function() {
5+
return ABC.charAt(Math.floor(Math.random() * ABC.length) + 1);
6+
}).join('');
57
const RandNum = Math.floor((Math.random() * 100) + 1);
68
const SecretName = `${RandName}-${RandNum}`;
79
const Secrets1 = {

0 commit comments

Comments
 (0)