@@ -623,18 +623,18 @@ plugins:
623623
624624 When ("providing a version string" , func () {
625625 It ("should create a valid CLI" , func () {
626- version := map [ string ] string {
627- "kubebuilder" : "123" ,
628- "kubernetes" : "123" ,
629- "buildDate" : "2025/12/3 " ,
630- "gitCommit" : "0123fasdf0123 " ,
631- "os" : "os123" ,
632- "arch" : "arch123" ,
626+ version := Version {
627+ KubeBuilderVersion : "123" ,
628+ KubernetesVendor : "123" ,
629+ GitCommit : "0123fasdf0123 " ,
630+ BuildDate : "2025-12-3 " ,
631+ GoOs : "os123" ,
632+ GoArch : "arch123" ,
633633 }
634634 c , err = New (
635635 WithPlugins (& golangv4.Plugin {}),
636636 WithDefaultPlugins (projectVersion , & golangv4.Plugin {}),
637- WithVersion (version ),
637+ WithVersion (& version ),
638638 )
639639 Expect (err ).NotTo (HaveOccurred ())
640640 Expect (hasSubCommand (c .cmd , "version" )).To (BeTrue ())
@@ -655,19 +655,11 @@ plugins:
655655 Expect (err ).NotTo (HaveOccurred ())
656656 printed , _ := io .ReadAll (r )
657657 Expect (string (printed )).To (Equal (
658- fmt .Sprintf (`Kubebuilder: %v
659- Kubernetes: %v
660- Git Commit: %v
661- Build date: %v
662- OS/Arch: %v/%v
663- ` ,
664- version ["kubebuilder" ],
665- version ["kubernetes" ],
666- version ["gitCommit" ],
667- version ["buildDate" ],
668- version ["os" ],
669- version ["arch" ],
670- )))
658+ fmt .Sprintf ("Kubebuilder:\t 123\n " +
659+ "Kubernetes:\t 123\n " +
660+ "Git Commit:\t 0123fasdf0123\n " +
661+ "Build Date:\t 2025-12-3\n " +
662+ "OS/Arch:\t os123/arch123\n " )))
671663 })
672664 })
673665
0 commit comments