Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Nov 19, 2024
1 parent 9a6451d commit c175969
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: 'yarn'
- name: install dependencies
run: yarn install --frozen-lockfile --prefer-offline --network-concurrency 1
Expand All @@ -43,6 +43,8 @@ jobs:
sudo sh -c "echo '127.0.0.1 testrequestbucket.localhost' >> /etc/hosts"
- name: test and coverage
run: yarn --silent coverage
env:
NODE_OPTIONS: "--tls-max-v1.2"
- name: run functional tests
run: yarn ft_test
- uses: codecov/codecov-action@v4
Expand All @@ -62,7 +64,7 @@ jobs:
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile --prefer-offline
Expand Down
4 changes: 2 additions & 2 deletions lib/models/ReplicationConfiguration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import UUID from 'uuid';
const { v4: uuid } = require('uuid');

import { RequestLogger } from 'werelogs';

Expand Down Expand Up @@ -157,7 +157,7 @@ export default class ReplicationConfiguration {
obj.id =
rule.ID && rule.ID[0] !== ''
? rule.ID[0]
: Buffer.from(UUID.v4()).toString('base64');
: Buffer.from(uuid()).toString('base64');

Check warning on line 160 in lib/models/ReplicationConfiguration.ts

View check run for this annotation

Codecov / codecov/patch

lib/models/ReplicationConfiguration.ts#L160

Added line #L160 was not covered by tests
// StorageClass is an optional property.
if (rule.Destination[0].StorageClass) {
obj.storageClass = rule.Destination[0].StorageClass[0];
Expand Down
2 changes: 1 addition & 1 deletion lib/policyEvaluator/utils/conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export function convertConditionOperator(operator: string): boolean {
} else {
return policyValRegex(key);
}
return true;
return undefined;

Check warning on line 280 in lib/policyEvaluator/utils/conditions.ts

View check run for this annotation

Codecov / codecov/patch

lib/policyEvaluator/utils/conditions.ts#L280

Added line #L280 was not covered by tests
},
StringNotLike: function stringNotLike(key: string, value: string[]) {
return !operatorMap.StringLike(key, value);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@
"lint": "eslint $(git ls-files '*ts' ' *.js')",
"lint_md": "mdlint $(git ls-files '*.md')",
"lint_yml": "yamllint $(git ls-files '*.yml')",
"test": "export NODE_OPTIONS=\"--tls-max-v1.2\" && jest tests/unit --detectOpenHandles",
"test": "jest tests/unit --detectOpenHandles",
"build": "tsc",
"prepare": "yarn build",
"ft_test": "jest tests/functional --testTimeout=120000 --forceExit",
"coverage": "export NODE_OPTIONS=\"--tls-max-v1.2\" && nyc --clean jest tests --coverage --testTimeout=120000 --forceExit",
"coverage": "nyc --clean jest tests --coverage --testTimeout=120000 --forceExit",
"build_doc": "cd documentation/listingAlgos/pics; dot -Tsvg delimiterStateChart.dot > delimiterStateChart.svg; dot -Tsvg delimiterMasterV0StateChart.dot > delimiterMasterV0StateChart.svg; dot -Tsvg delimiterVersionsStateChart.dot > delimiterVersionsStateChart.svg"
},
"private": true,
Expand Down

0 comments on commit c175969

Please sign in to comment.