-
Notifications
You must be signed in to change notification settings - Fork 4
Add MinIO for OSS unit tests #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: fengmk2 <[email protected]>
Co-authored-by: fengmk2 <[email protected]>
Co-authored-by: fengmk2 <[email protected]>
Co-authored-by: fengmk2 <[email protected]>
|
@copilot ci fail /usr/bin/docker pull bitnami/minio:latest
Error response from daemon: manifest for bitnami/minio:latest not found: manifest unknown: manifest unknown
Warning: Docker pull failed with exit code 1, back off 8.84 seconds before retry.
/usr/bin/docker pull bitnami/minio:latest
Error response from daemon: manifest for bitnami/minio:latest not found: manifest unknown: manifest unknown
Warning: Docker pull failed with exit code 1, back off 8.207 seconds before retry.
/usr/bin/docker pull bitnami/minio:latest
Error response from daemon: manifest for bitnami/minio:latest not found: manifest unknown: manifest unknown
Error: Docker pull failed with exit code 1 |
Co-authored-by: fengmk2 <[email protected]>
test/unit/client/Oss.test.ts
Outdated
| const hello = await client.oss.put({ | ||
| storeName: 'oss_demo', | ||
| bucket: 'antsys-tnpmbuild', | ||
| bucket: 'layotto-test-bucket', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Do not change the default value; the CI environment passes the bucket name through environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted in commit fd3544f. The bucket name is now back to antsys-tnpmbuild as the default value. The setup script also creates this bucket name. Tests are still enabled (removed describe.skip).
Co-authored-by: fengmk2 <[email protected]>
The OSS (Object Storage Service) unit tests were disabled (
describe.skip) due to dependency on an external bucketantsys-tnpmbuild. This PR adds local MinIO infrastructure to enable these tests.Changes
Infrastructure
docker-compose.yml: Added MinIO service (minio/minio:latest) on ports 9000/9001.github/workflows/nodejs.yml: MinIO started viadocker runcommand in setup step (using official minio/minio:latest image)scripts/setup-minio.sh: Automated bucket creation script using MinIO clientConfiguration
demo/config.json: Added file store configuration pointing to localhost MinIO instanceTests
test/unit/client/Oss.test.ts: Enabled 19 test cases, kept original bucket nameantsys-tnpmbuild(CI can override via environment variables)Usage
# Local development docker-compose up -d bash scripts/setup-minio.sh npm run test:unitThe setup script waits for MinIO readiness, installs the mc client, and creates the
antsys-tnpmbuildbucket automatically.Original prompt
<issue_description>>
What would you like to be added:
Why is this needed:</issue_description>
Comments on the Issue (you are @copilot in this section)
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.