The Tests/GithubRepositories.test.ps1New-GitHubRepository unit tests are failing when creating private repositories and checking that the has_wiki property is true.
This is due to support for Wikis being removed from private repos in the GitHub free tier.
Steps to reproduce the issue
invoke-pester Tests\GitHubRepositories.tests.ps1
Verbose logs showing the problem
[-] GitHubRepositories\New-GitHubRepository.When creating a repository for the authenticated user.When creating a private repository with default settings.Should return the correct properties 34ms (33ms|1ms)
Expected $true, but got $false.
at $repo.has_Wiki | Should -BeTrue, Tests\GitHubRepositories.tests.ps1:91
at <ScriptBlock>, Tests\GitHubRepositories.tests.ps1:91
[-] GitHubRepositories\New-GitHubRepository.When creating an organization repository.When creating a private repository with default settings.Should return the correct properties 19ms (18ms|1ms)
Expected $true, but got $false.
at $repo.has_Wiki | Should -BeTrue, Tests\GitHubRepositories.tests.ps1:286
at <ScriptBlock>, Tests\GitHubRepositories.tests.ps1:286
Suggested solution to the issue
Remove the has_wiki check from the New-GitHubRepository unit tests.
Requested Assignment
If possible, I would like to fix this.
Operating System
OSVersion Microsoft Windows NT 10.0.19045.0
Is 64-bit True
Current culture en-GB
Current UI culture en-GB
PowerShell Version
PSVersion 7.3.3
PSEdition Core
GitCommitId 7.3.3
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Details
The
Tests/GithubRepositories.test.ps1
New-GitHubRepository
unit tests are failing when creating private repositories and checking that thehas_wiki
property istrue
.This is due to support for Wikis being removed from private repos in the GitHub free tier.
Steps to reproduce the issue
Verbose logs showing the problem
Suggested solution to the issue
Remove the
has_wiki
check from theNew-GitHubRepository
unit tests.Requested Assignment
Operating System
PowerShell Version
Module Version