Download tasks/format-code-task-000063/tests/test.patch from FineEnvs/MiMo-V2.6-RL-harbor-code: direct link, hf CLI and curl.
- Browser
- Download file 3.02 kB
-
https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/resolve/refs%2Fpr%2F1/tasks/format-code-task-000063/tests/test.patch
- Command line
-
hf download hf://datasets/FineEnvs/MiMo-V2.6-RL-harbor-code@refs/pr/1/tasks/format-code-task-000063/tests/test.patch
-
curl -L -o test.patch https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/resolve/refs%2Fpr%2F1/tasks/format-code-task-000063/tests/test.patch
3.02 kB
| diff --git a/packages/dd-trace/test/plugins/util/redis.spec.js b/packages/dd-trace/test/plugins/util/redis.spec.js | |
| index c79cb6a22..d09ddc183 100644 | |
| --- a/packages/dd-trace/test/plugins/util/redis.spec.js | |
| +++ b/packages/dd-trace/test/plugins/util/redis.spec.js | |
| describe('plugins/util/redis', () => { | |
| expect(rawCommand.substr(0, 10)).to.equal('GET aaaaaa') | |
| expect(rawCommand.substr(990)).to.equal('aaaaaaa...') | |
| }) | |
| + | |
| + it('should not log the password from AUTH commands (lowercase)', () => { | |
| + span = redis.instrument(tracer, config, '0', 'auth', ['secret-password']) | |
| + | |
| + const rawCommand = span.context()._tags['redis.raw_command'] | |
| + | |
| + expect(rawCommand).to.equal('AUTH') | |
| + expect(rawCommand).to.not.include('secret-password') | |
| + }) | |
| + | |
| + it('should not log the password from AUTH commands (uppercase)', () => { | |
| + span = redis.instrument(tracer, config, '0', 'AUTH', ['secret-password']) | |
| + | |
| + const rawCommand = span.context()._tags['redis.raw_command'] | |
| + | |
| + expect(rawCommand).to.equal('AUTH') | |
| + expect(rawCommand).to.not.include('secret-password') | |
| + }) | |
| + | |
| + it('should not log username and password from AUTH commands with multiple args', () => { | |
| + span = redis.instrument(tracer, config, '0', 'auth', ['username', 'secret-password']) | |
| + | |
| + const rawCommand = span.context()._tags['redis.raw_command'] | |
| + | |
| + expect(rawCommand).to.equal('AUTH') | |
| + expect(rawCommand).to.not.include('secret-password') | |
| + expect(rawCommand).to.not.include('username') | |
| + }) | |
| + | |
| + it('should still set resource.name for AUTH commands', () => { | |
| + span = redis.instrument(tracer, config, '0', 'auth', ['secret-password']) | |
| + | |
| + expect(span.context()._tags).to.have.property('resource.name', 'auth') | |
| + }) | |
| + | |
| + it('should still include arguments for non-AUTH commands (preservation)', () => { | |
| + span = redis.instrument(tracer, config, '0', 'get', ['mykey']) | |
| + | |
| + const rawCommand = span.context()._tags['redis.raw_command'] | |
| + | |
| + expect(rawCommand).to.equal('GET mykey') | |
| + }) | |
| + | |
| + it('should still include arguments for SET command (preservation)', () => { | |
| + span = redis.instrument(tracer, config, '0', 'set', ['foo', 'bar']) | |
| + | |
| + const rawCommand = span.context()._tags['redis.raw_command'] | |
| + | |
| + expect(rawCommand).to.equal('SET foo bar') | |
| + }) | |
| }) | |
| }) | |
| diff --git a/test_commands.json b/test_commands.json | |
| new file mode 100644 | |
| index 000000000..3cc4332bb | |
| --- /dev/null | |
| +++ b/test_commands.json | |
| +{ | |
| + "test_commands": ["npx mocha --exit --file packages/dd-trace/test/setup/core.js packages/dd-trace/test/plugins/util/redis.spec.js"] | |
| +} | |
| diff --git a/mimo_test_command.sh b/mimo_test_command.sh | |
| new file mode 100755 | |
| --- /dev/null | |
| +++ b/mimo_test_command.sh | |
| +#!/usr/bin/env bash | |
| + | |
| +set -uo pipefail | |
| +cd /testbed | |
| +rc=0 | |
| +npx mocha --exit --file packages/dd-trace/test/setup/core.js packages/dd-trace/test/plugins/util/redis.spec.js | |
| +rc=$(( rc | $? )) | |
| +exit $rc | |