summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/images_test.go
blob: 3999de45784fad2e382fbfa6c4448290b83c313a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package abi

import (
	"testing"

	"github.com/containers/common/libimage"
	"github.com/stretchr/testify/assert"
)

// This is really intended to verify what happens with a
// nil pointer in layer.Created, but we'll just sanity
// check round tripping 42.
func TestToDomainHistoryLayer(t *testing.T) {
	var layer libimage.ImageHistory
	layer.Size = 42
	newLayer := toDomainHistoryLayer(&layer)
	assert.Equal(t, layer.Size, newLayer.Size)
}