Skip to content

test: skip non-applicable unit tests on Windows#651

Merged
priteshbandi merged 2 commits intonotaryproject:mainfrom
JeyJeyGao:fix/unit_test_on_win
Apr 27, 2023
Merged

test: skip non-applicable unit tests on Windows#651
priteshbandi merged 2 commits intonotaryproject:mainfrom
JeyJeyGao:fix/unit_test_on_win

Conversation

@JeyJeyGao
Copy link
Copy Markdown
Contributor

@JeyJeyGao JeyJeyGao commented Apr 26, 2023

Fix unit test:

  • skip some unit test cases because Windows handles file permissions differently from Unix-based systems, and therefore, using file permissions like 0000, 0600, 0644, or 0700 in tests may not work as expected on Windows.

Test:

  • unit test on Windows
  • unit test on Linux

Test output:

?       github.com/notaryproject/notation/cmd/notation/internal/cmdutil [no test files]
?       github.com/notaryproject/notation/cmd/notation/internal/errors  [no test files]
?       github.com/notaryproject/notation/internal/cmd  [no test files]
?       github.com/notaryproject/notation/cmd/notation/policy   [no test files]
?       github.com/notaryproject/notation/internal/experimental [no test files]
?       github.com/notaryproject/notation/internal/ioutil       [no test files]
ok      github.com/notaryproject/notation/cmd/notation  (cached)
ok      github.com/notaryproject/notation/cmd/notation/cert     (cached)
ok      github.com/notaryproject/notation/cmd/notation/internal/truststore      (cached)
ok      github.com/notaryproject/notation/internal/envelope     (cached)
ok      github.com/notaryproject/notation/internal/osutil       (cached)
ok      github.com/notaryproject/notation/internal/slices       (cached)
ok      github.com/notaryproject/notation/internal/trace        (cached)
ok      github.com/notaryproject/notation/internal/tree (cached)
ok      github.com/notaryproject/notation/internal/version      (cached)
ok      github.com/notaryproject/notation/pkg/auth      (cached)
ok      github.com/notaryproject/notation/pkg/configutil        (cached)

Signed-off-by: Junjie Gao junjiegao@microsoft.com

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 26, 2023

Codecov Report

Merging #651 (b8a6830) into main (2e56dd4) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #651   +/-   ##
=======================================
  Coverage   33.16%   33.16%           
=======================================
  Files          32       32           
  Lines        2014     2014           
=======================================
  Hits          668      668           
  Misses       1324     1324           
  Partials       22       22           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
@JeyJeyGao JeyJeyGao force-pushed the fix/unit_test_on_win branch from 4077014 to 7340c34 Compare April 26, 2023 04:31
@JeyJeyGao JeyJeyGao changed the title fix: unit test on Windows test: unit test on Windows Apr 26, 2023
Copy link
Copy Markdown
Contributor

@patrickzheng200 patrickzheng200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title should be test: skip non-applicable unit tests on Windows.

@JeyJeyGao JeyJeyGao changed the title test: unit test on Windows test: skip non-applicable unit tests on Windows Apr 27, 2023
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Copy link
Copy Markdown
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@patrickzheng200 patrickzheng200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@priteshbandi priteshbandi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@priteshbandi priteshbandi merged commit 5516199 into notaryproject:main Apr 27, 2023
7h3-3mp7y-m4n pushed a commit to 7h3-3mp7y-m4n/notation that referenced this pull request Mar 29, 2025
skip some unit test cases because Windows handles file permissions differently from Unix-based systems, and therefore, using file permissions like 0000, 0600, 0644, or 0700 in tests may not work as expected on Windows.

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
FeynmanZhou pushed a commit to FeynmanZhou/notation that referenced this pull request May 15, 2025
skip some unit test cases because Windows handles file permissions differently from Unix-based systems, and therefore, using file permissions like 0000, 0600, 0644, or 0700 in tests may not work as expected on Windows.

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
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.

5 participants