Skip to content

Commit

Permalink
test, remove window perm from workflow
Browse files Browse the repository at this point in the history
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
  • Loading branch information
gauron99 committed Aug 28, 2024
1 parent 9a77161 commit a376424
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/test-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
env:
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
- name: Core Unit Linux/Mac Permission Test
if: matrix.os != 'windows-latest'
run: RUN_TARGET_TEST=TestCredentialsHomePermissions go test -run=TestCredentialsHomePermissions
env:
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
- name: Template Unit Tests
run: make test-templates
- name: "Archive code coverage results"
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ $(BIN): generate/zz_filesystem_generated.go

.PHONY: test
test: generate/zz_filesystem_generated.go ## Run core unit tests
ifdef RUN_TARGET_TEST
go test -ldflags "$(LDFLAGS)" -race -cover -coverprofile=coverage.txt ./... -run=$(RUN_TARGET_TEST)
else
go test -ldflags "$(LDFLAGS)" -race -cover -coverprofile=coverage.txt ./...
endif

.PHONY: check
check: $(BIN_GOLANGCI_LINT) ## Check code quality (lint)
Expand Down
8 changes: 7 additions & 1 deletion pkg/docker/creds/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,14 @@ func TestCredentialsWithoutHome(t *testing.T) {
// works in scenarios where HOME has different permissions
func TestCredentialsHomePermissions(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("skip windows perms for this test until windows perms are added") // TODO: gauron99 fix this
t.Skip("skip windows perms for this test until windows perms are added")
}
// run this test only in specific setting in GH Actions
if os.Getenv("RUN_TARGET_TEST") != "TestCredentialsHomePermissions" {
fmt.Printf("Skipping because RUN_TARGET_TEST variable wasnt specified")
t.Skip()
}

type args struct {
promptUser creds.CredentialsCallback
verifyCredentials creds.VerifyCredentialsCallback
Expand Down

0 comments on commit a376424

Please sign in to comment.