Complete filesystem simplification workstream
This commit is contained in:
@@ -103,7 +103,7 @@ func TestAssetBuilderBuildsNamedAssetsAndChecksEmbeddedVersion(t *testing.T) {
|
||||
outputDir := filepath.Join(t.TempDir(), "assets")
|
||||
goLog := filepath.Join(t.TempDir(), "go.log")
|
||||
|
||||
command := exec.Command("sh", builder, "v1.2.3", outputDir)
|
||||
command := exec.Command("sh", builder, "v0.0.0-test", outputDir)
|
||||
command.Dir = t.TempDir()
|
||||
command.Env = append(os.Environ(),
|
||||
"PATH="+binDir+string(os.PathListSeparator)+os.Getenv("PATH"),
|
||||
@@ -124,23 +124,23 @@ func TestAssetBuilderBuildsNamedAssetsAndChecksEmbeddedVersion(t *testing.T) {
|
||||
}
|
||||
sort.Strings(got)
|
||||
want := []string{
|
||||
"narratio-v1.2.3-darwin-amd64",
|
||||
"narratio-v1.2.3-darwin-arm64",
|
||||
"narratio-v1.2.3-linux-amd64",
|
||||
"narratio-v1.2.3-linux-arm64",
|
||||
"narratio-v1.2.3-windows-amd64.exe",
|
||||
"narratio-v1.2.3-windows-arm64.exe",
|
||||
"narratio-v0.0.0-test-darwin-amd64",
|
||||
"narratio-v0.0.0-test-darwin-arm64",
|
||||
"narratio-v0.0.0-test-linux-amd64",
|
||||
"narratio-v0.0.0-test-linux-arm64",
|
||||
"narratio-v0.0.0-test-windows-amd64.exe",
|
||||
"narratio-v0.0.0-test-windows-arm64.exe",
|
||||
}
|
||||
if !slicesEqual(got, want) {
|
||||
t.Fatalf("asset names = %#v, want %#v", got, want)
|
||||
}
|
||||
version := exec.Command(filepath.Join(outputDir, "narratio-v1.2.3-linux-amd64"), "version")
|
||||
version := exec.Command(filepath.Join(outputDir, "narratio-v0.0.0-test-linux-amd64"), "version")
|
||||
var versionOutput bytes.Buffer
|
||||
version.Stdout = &versionOutput
|
||||
if err := version.Run(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := versionOutput.String(); got != "narratio v1.2.3\n" {
|
||||
if got := versionOutput.String(); got != "narratio v0.0.0-test\n" {
|
||||
t.Fatalf("embedded version output = %q", got)
|
||||
}
|
||||
goCommands, err := os.ReadFile(goLog)
|
||||
|
||||
Reference in New Issue
Block a user