Create image reference cache.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-07-26 08:05:44 +00:00
parent cfdf872493
commit 953d67d250
22 changed files with 640 additions and 456 deletions

View File

@@ -46,3 +46,14 @@ func TestSubtractStringSlice(t *testing.T) {
assert.Empty(t, SubtractStringSlice(nil, "hij"))
assert.Empty(t, SubtractStringSlice([]string{}, "hij"))
}
func TestMergeStringSlices(t *testing.T) {
s1 := []string{"abc", "def", "ghi"}
s2 := []string{"def", "jkl", "mno"}
expect := []string{"abc", "def", "ghi", "jkl", "mno"}
result := MergeStringSlices(s1, s2)
assert.Len(t, result, len(expect))
for _, s := range expect {
assert.Contains(t, result, s)
}
}