MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / TestEncodeDefaultsVersion

Function TestEncodeDefaultsVersion

internal/artifact/encode_test.go:116–127  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

114}
115
116func TestEncodeDefaultsVersion(t *testing.T) {
117 a := samplePlaybook()
118 a.FormatVersion = 0
119 a.Provenance.FormatVersion = 0
120 out, err := Encode(a)
121 if err != nil {
122 t.Fatalf("Encode: %v", err)
123 }
124 if !bytes.Contains(out, []byte("format_version: 1")) {
125 t.Errorf("expected default format_version: 1 in output:\n%s", out)
126 }
127}

Callers

nothing calls this directly

Calls 3

samplePlaybookFunction · 0.85
EncodeFunction · 0.85
FatalfMethod · 0.80

Tested by

no test coverage detected