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

Force server FQDN to lowercase, for handling windows output gracefully. #89

Merged
merged 1 commit into from
Nov 28, 2023

Commits on Nov 13, 2023

  1. Force server FQDN to lowercase, for handling windows output gracefully.

    Extend fixture test case as well.
    
    See,
    ```
    --- FAIL: TestParseLmstatLicenseInfoServer (0.00s)
    panic: runtime error: invalid memory address or nil pointer dereference [recovered]
            panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x102cb46d4]
    
    goroutine 38 [running]:
    testing.tRunner.func1.2({0x102dcd700, 0x10311b520})
            /opt/homebrew/Cellar/go/1.21.4/libexec/src/testing/testing.go:1545 +0x1c8
    testing.tRunner.func1()
            /opt/homebrew/Cellar/go/1.21.4/libexec/src/testing/testing.go:1548 +0x360
    panic({0x102dcd700?, 0x10311b520?})
            /opt/homebrew/Cellar/go/1.21.4/libexec/src/runtime/panic.go:914 +0x218
    github.com/mjtrangoni/flexlm_exporter/collector.parseLmstatLicenseInfoServer({0x140000de300, 0x10, 0x200?})
            /Users/mtrangoni/git/flexlm_exporter.git/collector/lmstat.go:233 +0x1e4
    github.com/mjtrangoni/flexlm_exporter/collector.TestParseLmstatLicenseInfoServer(0x140002151e0)
            /Users/mtrangoni/git/flexlm_exporter.git/collector/lmstat_test.go:164 +0x844
    testing.tRunner(0x140002151e0, 0x102e45fc0)
            /opt/homebrew/Cellar/go/1.21.4/libexec/src/testing/testing.go:1595 +0xe8
    created by testing.(*T).Run in goroutine 1
            /opt/homebrew/Cellar/go/1.21.4/libexec/src/testing/testing.go:1648 +0x33c
    FAIL    github.com/mjtrangoni/flexlm_exporter/collector 0.343s
    ```
    
    Signed-off-by: Mario Trangoni <[email protected]>
    mjtrangoni committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    0267673 View commit details
    Browse the repository at this point in the history