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

cobra-cli: fix the build #214715

Merged
merged 1 commit into from
Feb 6, 2023
Merged

Conversation

viraptor
Copy link
Contributor

@viraptor viraptor commented Feb 5, 2023

Description of changes

Fix two issues:

  • Skip tests which depend on the current year.
  • Ensure go is in PATH.
--- FAIL: TestGoldenAddCmd (0.00s)
    add_test.go:28: "/build/source/cmd/testproject/cmd/test.go" and "testdata/test.go.golden" are not equal!
        
        $ diff -u /build/source/cmd/testproject/cmd/test.go testdata/test.go.golden
        --- /build/source/cmd/testproject/cmd/test.go   2023-02-05 09:28:59.719342469 +0000
        +++ testdata/test.go.golden     1970-01-01 00:00:01.000000000 +0000
        @@ -1,5 +1,5 @@
         /*
        -Copyright © 2023 NAME HERE <EMAIL ADDRESS>
        +Copyright © 2022 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.17s)
    --- FAIL: TestGoldenInitCmd/successfully_creates_a_project_based_on_module (0.17s)
        init_test.go:77: "/build/source/cmd/testproject/main.go" and "testdata/main.go.golden" are not equal!
            
            $ diff -u /build/source/cmd/testproject/main.go testdata/main.go.golden
            --- /build/source/cmd/testproject/main.go   2023-02-05 09:28:59.892341870 +0000
            +++ testdata/main.go.golden 1970-01-01 00:00:01.000000000 +0000
            @@ -1,5 +1,5 @@
             /*
            -Copyright © 2023 NAME HERE <EMAIL ADDRESS>
            +Copyright © 2022 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
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Fix two issues:
- Skip tests which depend on the current year.
- Ensure go is in PATH.
@ivankovnatsky
Copy link
Contributor

Result of nixpkgs-review pr 214715 run on x86_64-linux 1

1 package built:
  • cobra-cli

@viraptor viraptor merged commit 918fa4e into NixOS:master Feb 6, 2023
@viraptor viraptor deleted the viraptor/cobra-cli-year-fix branch February 6, 2023 08:53
@yurrriq
Copy link
Member

yurrriq commented Feb 22, 2023

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants