Skip to content

Conversation

Copy link

Copilot AI commented Nov 11, 2025

The OSS (Object Storage Service) unit tests were disabled (describe.skip) due to dependency on an external bucket antsys-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 via docker run command in setup step (using official minio/minio:latest image)
  • scripts/setup-minio.sh: Automated bucket creation script using MinIO client

Configuration

  • demo/config.json: Added file store configuration pointing to localhost MinIO instance

Tests

  • test/unit/client/Oss.test.ts: Enabled 19 test cases, kept original bucket name antsys-tnpmbuild (CI can override via environment variables)

Usage

# Local development
docker-compose up -d
bash scripts/setup-minio.sh
npm run test:unit

The setup script waits for MinIO readiness, installs the mc client, and creates the antsys-tnpmbuild bucket automatically.

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>Add minio for oss unittest</issue_title>
<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

This section details on the original issue you should resolve

<issue_title>Add minio for oss unittest</issue_title>
<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)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add minio for OSS unit tests Add MinIO for OSS unit tests Nov 11, 2025
Copilot AI requested a review from fengmk2 November 11, 2025 14:13
@fengmk2
Copy link
Member

fengmk2 commented Nov 12, 2025

@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

Copy link
Author

Copilot AI commented Nov 12, 2025

@copilot ci fail

...

Fixed in commit 60a5c9d. Changed from the non-existent bitnami/minio:latest image to the official minio/minio:latest image. MinIO is now started as a docker container in the setup step instead of as a GitHub Actions service, which allows proper command configuration.

const hello = await client.oss.put({
storeName: 'oss_demo',
bucket: 'antsys-tnpmbuild',
bucket: 'layotto-test-bucket',
Copy link
Member

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.

Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add minio for oss unittest

2 participants