github.com/metasources/buildx@v0.0.0-20230418141019-7aa1459cedea/test/integration/distro_test.go (about)

     1  package integration
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  
     8  	"github.com/metasources/buildx/buildx/linux"
     9  	"github.com/metasources/buildx/buildx/source"
    10  )
    11  
    12  func TestDistroImage(t *testing.T) {
    13  	sbom, _ := catalogFixtureImage(t, "image-distro-id", source.SquashedScope, nil)
    14  
    15  	expected := &linux.Release{
    16  		PrettyName: "BusyBox v1.31.1",
    17  		Name:       "busybox",
    18  		ID:         "busybox",
    19  		IDLike:     []string{"busybox"},
    20  		Version:    "1.31.1",
    21  		VersionID:  "1.31.1",
    22  	}
    23  
    24  	assert.Equal(t, expected, sbom.Artifacts.LinuxDistribution)
    25  }