Skip to content
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

Create a mock console to increase test coverage on mac #1461

Open
1 task done
TerryHowe opened this issue Jul 28, 2024 · 4 comments
Open
1 task done

Create a mock console to increase test coverage on mac #1461

TerryHowe opened this issue Jul 28, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@TerryHowe
Copy link
Member

What is the version of your ORAS CLI

1.2.0

What would you like to be added?

Increase test coverage on mac with mock console

Why is this needed for ORAS?

These tests do not run on mac because of X-code issue:

 % grep -r solaris cmd internal 
cmd/oras/internal/option/common_unix_test.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/internal/display/status/track/target_test.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/internal/display/status/progress/manager_test.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/internal/display/status/progress/status_test.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/internal/display/status/tty_console_test.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/internal/display/status/console/console_test.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/internal/display/status/console/testutils/testutils.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/root/cp_test.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/root/blob/push_test.go://go:build freebsd || linux || netbsd || openbsd || solaris
cmd/oras/root/blob/fetch_test.go://go:build freebsd || linux || netbsd || openbsd || solaris

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.
@TerryHowe TerryHowe added enhancement New feature or request triage New issues or PRs to be acknowledged by maintainers labels Jul 28, 2024
@TerryHowe TerryHowe self-assigned this Jul 28, 2024
@qweeah qweeah removed the triage New issues or PRs to be acknowledged by maintainers label Jul 30, 2024
@qweeah
Copy link
Contributor

qweeah commented Jul 30, 2024

  1. Where should be mac test be run?
  2. How to merge the test coverage of mac with linux's?
  3. What SDK should be used to mock the console test on mac?

@TerryHowe
Copy link
Member Author

  1. I'm hoping that everything outside of cmd/oras/internal/display/status/progress would be tested on mac
  2. I was hoping that a layer would be created at progress package that could be mocked with dependency injection
  3. I was not planning on bringing in a package for mock, just go code.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale Inactive issues or pull requests label Sep 29, 2024
@TerryHowe TerryHowe removed the stale Inactive issues or pull requests label Sep 29, 2024
@TerryHowe
Copy link
Member Author

Close to done. Related:

#1481
#1474
#1511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants