Files
podman/pkg/machine/fcos_test.go
Brent Baude a45ba06d02 Refactor key machine objects
In #20538, I was asked to consider refactoring the new OCI pull code
from within the generic machine directory.  This is something I had
tried when originally coding it but it became apparent that a much
larger refactor to prevent circular deps was needed.  Because I did not
want to pollute the initial PR with that refactor, I asked for the PR to
merge first.  This is the refactor that needed to be done.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-11-07 08:30:44 -06:00

45 lines
656 B
Go

//go:build amd64 || arm64
// +build amd64 arm64
package machine
import (
"testing"
)
func TestFCOSStream_String(t *testing.T) {
tests := []struct {
name string
st FCOSStream
want string
}{
{
name: "testing",
st: Testing,
want: "testing",
},
{
name: "stable",
st: Stable,
want: "stable",
},
{
name: "next",
st: Next,
want: "next",
},
{
name: "default is custom",
st: CustomStream,
want: "custom",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.st.String(); got != tt.want {
t.Errorf("String() = %v, want %v", got, tt.want)
}
})
}
}