-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🌱 Several small changes to make debugging bare-metal provisioning easier
- Loading branch information
Showing
15 changed files
with
3,898 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,11 @@ package v1beta1 | |
|
||
import ( | ||
"errors" | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
"github.com/stretchr/testify/require" | ||
capierrors "sigs.k8s.io/cluster-api/errors" | ||
) | ||
|
||
|
@@ -235,3 +237,51 @@ var _ = Describe("Test HasHostAnnotation", func() { | |
}), | ||
) | ||
}) | ||
|
||
func Test_Image_String(t *testing.T) { | ||
for _, row := range []struct { | ||
image Image | ||
expected string | ||
}{ | ||
{ | ||
Image{ | ||
URL: "", | ||
Name: "", | ||
Path: "", | ||
}, | ||
"", | ||
}, | ||
{ | ||
Image{ | ||
URL: "https://user:[email protected]/images/Ubuntu-2204-jammy-amd64-custom.tar.gz", | ||
Name: "Ubuntu-2204", | ||
Path: "", | ||
}, | ||
"Ubuntu-2204 (https://user:[email protected]/images/Ubuntu-2204-jammy-amd64-custom.tar.gz)", | ||
}, | ||
{ | ||
Image{ | ||
URL: "https://example.com/foo.tgz", | ||
Name: "foo", | ||
Path: "", | ||
}, | ||
"foo (https://example.com/foo.tgz)", | ||
}, | ||
{ | ||
Image{ | ||
URL: "https://example.com/nameless.tgz", | ||
Path: "", | ||
}, | ||
"https://example.com/nameless.tgz", | ||
}, | ||
{ | ||
Image{ | ||
Name: "nfs", | ||
Path: "/root/.oldroot/nfs/install/../images/Ubuntu-2004-focal-64-minimal-hwe.tar.gz", | ||
}, | ||
"nfs (/root/.oldroot/nfs/install/../images/Ubuntu-2004-focal-64-minimal-hwe.tar.gz)", | ||
}, | ||
} { | ||
require.Equal(t, row.expected, row.image.String()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
vendor/github.com/stretchr/testify/require/forward_requirements.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.