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

Namespace issue in New-RequirementGroup #61

Closed
jazz127 opened this issue Feb 26, 2020 · 3 comments
Closed

Namespace issue in New-RequirementGroup #61

jazz127 opened this issue Feb 26, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@jazz127
Copy link

jazz127 commented Feb 26, 2020

I downloaded and have been trying out the module from the gallery version 2.3.4.

Whilst it's very likely that I'm doing something wrong, when I take the sample namespace code from the readme, the output on my systems shows :: instead of the actual namespace from the requriementgroup.

I found that i had to update line 162 of interface.ps1 to use $name instead ($r.Namespace = $Name, $r.Namespace -join $NamespaceDelimiter) because some for some reason the alias doesn't work on my system.

Sorry if this isn't logged in the exactly correct method (it's my first day)

@chriskuech
Copy link
Contributor

Can you give me the exact snippet that fails? I'm unable to reproduce the issue so far.

@jazz127
Copy link
Author

jazz127 commented Feb 27, 2020

Hi,

Here's an example that I made and it's associated output. It also occurs on the sample code from the "Managing large configurations with Namespaces" section using exact copy and paste.

New-RequirementGroup -Name "Parentgroup" {
    New-RequirementGroup -Name "childgroup" {
        New-Requirement -Namespace "requirement1" -Describe "This a requirement" -Test {Test-Path C:\requirementtest} -Set {MKDIR C:\requirementtest}
    }
}
Namespace : ::requirement1
Describe  : This a requirement
Test      : Test-Path C:\requirementtest
Set       : MKDIR C:\requirementtest
DependsOn : {}

`
I've tried this on a couple of machines and get the same issue until I edit the source code of the module as above.

`
PS C:\Windows\system32> $PSVersionTable

Name Value


PSVersion 5.1.17763.771
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.771
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
`

@chriskuech chriskuech added the bug Something isn't working label Feb 28, 2020
@chriskuech
Copy link
Contributor

I think this was a weird scoping issue that broke one of my tests. I just fixed and added your test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants