Skip to content

Commit

Permalink
fix: formatting directive bugs in test (#2134)
Browse files Browse the repository at this point in the history
I'm getting a build error in my builds because nogo complains about this
bug. I guess I could configure my nogo to no check this code, but I
think it should be fixed.

---------

Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
  • Loading branch information
tokongs and aignas authored Aug 21, 2024
1 parent d7d2ce7 commit bdcf53a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ A brief description of the categories of changes:
### Changed
* Nothing yet

### Fixed
* (gazelle): Fix incorrect use of `t.Fatal`/`t.Fatalf` in tests.

### Added
* Nothing yet

Expand Down
6 changes: 3 additions & 3 deletions gazelle/manifest/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ import (
func TestGazelleManifestIsUpdated(t *testing.T) {
requirementsPath := os.Getenv("_TEST_REQUIREMENTS")
if requirementsPath == "" {
t.Fatalf("_TEST_REQUIREMENTS must be set")
t.Fatal("_TEST_REQUIREMENTS must be set")
}

manifestPath := os.Getenv("_TEST_MANIFEST")
if manifestPath == "" {
t.Fatalf("_TEST_MANIFEST must be set")
t.Fatal("_TEST_MANIFEST must be set")
}

manifestFile := new(manifest.File)
Expand All @@ -53,7 +53,7 @@ func TestGazelleManifestIsUpdated(t *testing.T) {
manifestGeneratorHashPath, err := runfiles.Rlocation(
os.Getenv("_TEST_MANIFEST_GENERATOR_HASH"))
if err != nil {
t.Fatal("failed to resolve runfiles path of manifest: %v", err)
t.Fatalf("failed to resolve runfiles path of manifest: %v", err)
}

manifestGeneratorHash, err := os.Open(manifestGeneratorHashPath)
Expand Down

0 comments on commit bdcf53a

Please sign in to comment.