cmd(version): check for more errors in the test
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ed72a0db66
commit
0b5559336e
@ -5,6 +5,7 @@ package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"os"
|
||||
"regexp"
|
||||
"testing"
|
||||
@ -17,9 +18,13 @@ func TestNixFlake_GosrcVersionStringEquivalence(t *testing.T) {
|
||||
|
||||
fData, err := os.ReadFile("../flake.nix")
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
t.Errorf("Failed to open flake.nix: %q", err)
|
||||
}
|
||||
|
||||
t.Errorf("Error reading flake: %q", err)
|
||||
}
|
||||
|
||||
got := bytes.Contains(fData, []byte(" version = \""+want+"\""))
|
||||
|
||||
if !got {
|
||||
|
Loading…
Reference in New Issue
Block a user