weldr/api_test: don't access what should be private Store fields

In a follow-up these will be made private.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-05-08 18:36:19 +02:00
parent e5b3e737b6
commit 4c4bad5444

View file

@ -521,11 +521,13 @@ func TestCompose(t *testing.T) {
continue
}
require.Equalf(t, 1, len(s.Composes), "%s: bad compose count in store", c.Path)
composes := s.GetAllComposes()
require.Equalf(t, 1, len(composes), "%s: bad compose count in store", c.Path)
// I have no idea how to get the compose in better way
var composeStruct compose.Compose
for _, c := range s.Composes {
for _, c := range composes {
composeStruct = c
break
}
@ -564,7 +566,7 @@ func TestComposeDelete(t *testing.T) {
idsInStore := []string{}
for id := range s.Composes {
for id := range s.GetAllComposes() {
idsInStore = append(idsInStore, id.String())
}