Skip to content

Make permission tests compatible with minio-js version 8.0.0 #3322

@kaankabalak

Description

@kaankabalak

NOTE

If this case is urgent, please subscribe to SUBNET so that our 24/7 support team may help you faster.

Expected Behavior

TypeScript compilation should be completed properly while running the permission tests on PR workflows.

Current Behavior

TypeScript compilation fails while running the permission tests on PR workflows with the following message:

Run npx testcafe "chrome:headless" web-app/tests/permissions-1/ -q --skip-js-errors -c 3
ERROR Cannot prepare tests due to the following error:

Error: TypeScript compilation failed.
/home/runner/work/console/console/web-app/tests/utils/functions.ts (37, [4](https://github.com/minio/console/actions/runs/8899391570/job/24438772264#step:9:5)7): Type '(err: any) => void' has no properties in common with type 'MakeBucketOpt'.
/home/runner/work/console/console/web-app/tests/utils/functions.ts (66, 68): Expected 3-4 arguments, but got [5](https://github.com/minio/console/actions/runs/8899391570/job/24438772264#step:9:6).

Possible Solution

We would need to migrate the minio-js functions used in the console/web-app/tests/utils/functions.ts path based on the function signatures present in minio-js v8.0.0.

Steps to Reproduce (for bugs)

Local:

  1. Revert commit fe534ab4e683ba93d7123a92e36ca426b198e10c
  2. Navigate to the web-app directory
  3. Run yarn install to install modules necessary for the front-end. Make sure that the version of minio-js installed is v8.0.0.
  4. Run the following command from the main console directory:
npx testcafe "chrome:headless" web-app/tests/permissions-1/ -q --skip-js-errors -c 3
  1. Observe that the Permission tests fail due to TypeScript compilation failing

GitHub:

  1. Revert commit fe534ab4e683ba93d7123a92e36ca426b198e10c
  2. Send a PR to start the workflow run
  3. Observe that the Permission tests fail due to TypeScript compilation failing

Context

This issue was causing permission tests to fail in PR workflows, causing potential confusion regarding if anything in the PR broke the permission tests.

This issue was first detected on PR #3319, temporary fix #3321 was sent to prevent this from blocking any incoming PRs.

Regression

Issue was happening with the new version of minio-js until temporary fix #3321 was merged.

Your Environment

This issue is present in all environments where minio-js 8.0.0 is used while running permission tests.

Metadata

Metadata

Assignees

Labels

bugthis needs to be fixedjavascriptPull requests that update Javascript codetriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions