diff --git a/internal/blueprint/blueprint_test.go b/internal/blueprint/blueprint_test.go index 77dfc648a..70ccce549 100644 --- a/internal/blueprint/blueprint_test.go +++ b/internal/blueprint/blueprint_test.go @@ -2,6 +2,7 @@ package blueprint import ( "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/assert" "testing" ) @@ -89,3 +90,20 @@ func TestBumpVersion(t *testing.T) { } } } + +func TestGetPackages(t *testing.T) { + + bp := Blueprint{ + Name: "packages-test", + Description: "Testing GetPackages function", + Version: "0.0.1", + Packages: []Package{ + {Name: "tmux", Version: "1.2"}}, + Modules: []Package{ + {Name: "openssh-server", Version: "*"}}, + Groups: []Group{ + {Name: "anaconda-tools"}}, + } + Received_packages := bp.GetPackages() + assert.ElementsMatch(t, []string{"tmux-1.2", "openssh-server", "@anaconda-tools"}, Received_packages) +}