minor fixups

This commit is contained in:
2023-04-12 12:51:41 -07:00
parent be216aefe5
commit 220b38c46d
3 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package packerlib
import "testing"
func TestJSONPath(t *testing.T) {
baseName := "cm4-cluster-ubuntu-22.04.2"
spec := UbuntuBoardSpec{
ImageName: "cm4-cluster-ubuntu-22.04.2" + ".img",
}
outPath := spec.JSONPath("")
expected := baseName + ".json"
if outPath != expected {
t.Fatalf("bad JSON path name: have %s, expect %s", outPath, expected)
}
}