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

Trivial test failure in cmd/ #1311

Closed
eclipseo opened this issue Jan 7, 2021 · 1 comment
Closed

Trivial test failure in cmd/ #1311

eclipseo opened this issue Jan 7, 2021 · 1 comment

Comments

@eclipseo
Copy link

eclipseo commented Jan 7, 2021

I've got the following error when running the tests:

github.com/spf13/cobra/cobra/cmd
--- FAIL: TestGoldenAddCmd (0.00s)
    add_test.go:26: "/builddir/build/BUILD/cobra-1.1.1/_build/src/github.com/spf13/cobra/cobra/cmd/testproject/cmd/test.go" and "testdata/test.go.golden" are not equal!
        
        $ diff -u /builddir/build/BUILD/cobra-1.1.1/_build/src/github.com/spf13/cobra/cobra/cmd/testproject/cmd/test.go testdata/test.go.golden
        --- /builddir/build/BUILD/cobra-1.1.1/_build/src/github.com/spf13/cobra/cobra/cmd/testproject/cmd/test.go	2021-01-07 15:11:53.748686159 +0000
        +++ testdata/test.go.golden	2020-10-18 18:59:26.000000000 +0000
        @@ -1,5 +1,5 @@
         /*
        -Copyright © 2021 NAME HERE <EMAIL ADDRESS>
        +Copyright © 2020 NAME HERE <EMAIL ADDRESS>
         
         Licensed under the Apache License, Version 2.0 (the "License");
         you may not use this file except in compliance with the License.
        
        exit status 1
--- FAIL: TestGoldenInitCmd (0.00s)
    --- FAIL: TestGoldenInitCmd/successfully_creates_a_project_with_name (0.00s)
        init_test.go:89: "/builddir/build/BUILD/cobra-1.1.1/_build/src/github.com/spf13/cobra/cobra/cmd/testproject/main.go" and "testdata/main.go.golden" are not equal!
            
            $ diff -u /builddir/build/BUILD/cobra-1.1.1/_build/src/github.com/spf13/cobra/cobra/cmd/testproject/main.go testdata/main.go.golden
            --- /builddir/build/BUILD/cobra-1.1.1/_build/src/github.com/spf13/cobra/cobra/cmd/testproject/main.go	2021-01-07 15:11:53.750686329 +0000
            +++ testdata/main.go.golden	2020-10-18 18:59:26.000000000 +0000
            @@ -1,5 +1,5 @@
             /*
            -Copyright © 2021 NAME HERE <EMAIL ADDRESS>
            +Copyright © 2020 NAME HERE <EMAIL ADDRESS>
             
             Licensed under the Apache License, Version 2.0 (the "License");
             you may not use this file except in compliance with the License.
            
            exit status 1
FAIL
exit status 1
FAIL	github.com/spf13/cobra/cobra/cmd	0.009s

It seems easy to fix.

eclipseo added a commit to eclipseo/cobra that referenced this issue Jan 7, 2021
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
eclipseo added a commit to eclipseo/cobra that referenced this issue Jan 7, 2021
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
@eclipseo
Copy link
Author

eclipseo commented Jan 7, 2021

Already a PR for this, closing.

@eclipseo eclipseo closed this as completed Jan 7, 2021
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

No branches or pull requests

1 participant