We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65c107f commit ae1ac32Copy full SHA for ae1ac32
manifest/parse_test.go
@@ -0,0 +1,20 @@
1
+package manifest_test
2
+
3
+import (
4
+ "strings"
5
+ "testing"
6
7
+ "github.com/docker-library/go-dockerlibrary/manifest"
8
+)
9
10
+func TestParseError(t *testing.T) {
11
+ invalidManifest := `this is just completely bogus and invalid no matter how you slice it`
12
13
+ man, err := manifest.Parse(strings.NewReader(invalidManifest))
14
+ if err == nil {
15
+ t.Errorf("Expected error, got valid manifest instead:\n%s", man)
16
+ }
17
+ if !strings.HasPrefix(err.Error(), "cannot parse manifest in either format:") {
18
+ t.Errorf("Unexpected error: %v", err)
19
20
+}
0 commit comments