| OLD | NEW |
| 1 // Copyright 2017 The LUCI Authors. All rights reserved. | 1 // Copyright 2017 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package cipd | 5 package cipd |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "testing" | 9 "testing" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 Path: "foo/bar", | 24 Path: "foo/bar", |
| 25 } | 25 } |
| 26 So(validatePackage(pkg), ShouldNotBeNil) | 26 So(validatePackage(pkg), ShouldNotBeNil) |
| 27 So(func() { | 27 So(func() { |
| 28 _ = writeEnsureFile(&buf, []*env.Spec_Package{pk
g}) | 28 _ = writeEnsureFile(&buf, []*env.Spec_Package{pk
g}) |
| 29 }, ShouldPanic) | 29 }, ShouldPanic) |
| 30 }) | 30 }) |
| 31 | 31 |
| 32 Convey(`Can write a manifest for packages`, func() { | 32 Convey(`Can write a manifest for packages`, func() { |
| 33 err := writeEnsureFile(&buf, []*env.Spec_Package{ | 33 err := writeEnsureFile(&buf, []*env.Spec_Package{ |
| 34 » » » » &env.Spec_Package{"foo/bar", "baz"}, | 34 » » » » {"foo/bar", "baz"}, |
| 35 » » » » &env.Spec_Package{"pants", "key:value"}, | 35 » » » » {"pants", "key:value"}, |
| 36 }) | 36 }) |
| 37 So(err, ShouldBeNil) | 37 So(err, ShouldBeNil) |
| 38 So(buf.String(), ShouldResemble, "foo/bar baz\npants key
:value\n") | 38 So(buf.String(), ShouldResemble, "foo/bar baz\npants key
:value\n") |
| 39 }) | 39 }) |
| 40 }) | 40 }) |
| 41 } | 41 } |
| OLD | NEW |