From c0be0bd6579e0a7ca920eb999432b75b70394511 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Thu, 16 May 2024 12:19:42 +0530 Subject: [PATCH] Revert "Version: Add podman bundle version to version command/api" This reverts commit 181954f43b40ffc294295ee74074efedb5fdca11. --- cmd/crc/cmd/version.go | 3 --- cmd/crc/cmd/version_test.go | 3 +-- pkg/crc/api/api_client_test.go | 1 - pkg/crc/api/api_http_test.go | 2 +- pkg/crc/api/client/types.go | 1 - pkg/crc/api/handlers.go | 1 - 6 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cmd/crc/cmd/version.go b/cmd/crc/cmd/version.go index adb63a8637..397949b560 100644 --- a/cmd/crc/cmd/version.go +++ b/cmd/crc/cmd/version.go @@ -37,7 +37,6 @@ type version struct { Version string `json:"version"` Commit string `json:"commit"` OpenshiftVersion string `json:"openshiftVersion"` - PodmanVersion string `json:"podmanVersion"` } func defaultVersion() *version { @@ -45,7 +44,6 @@ func defaultVersion() *version { Version: crcversion.GetCRCVersion(), Commit: crcversion.GetCommitSha(), OpenshiftVersion: crcversion.GetBundleVersion(crcPreset.OpenShift), - PodmanVersion: crcversion.GetBundleVersion(crcPreset.Podman), } } @@ -62,6 +60,5 @@ func (v *version) lines() []string { return []string{ fmt.Sprintf("CRC version: %s+%s\n", v.Version, v.Commit), fmt.Sprintf("OpenShift version: %s\n", v.OpenshiftVersion), - fmt.Sprintf("Podman version: %s\n", v.PodmanVersion), } } diff --git a/cmd/crc/cmd/version_test.go b/cmd/crc/cmd/version_test.go index ad29f68fee..4fc2e5c885 100644 --- a/cmd/crc/cmd/version_test.go +++ b/cmd/crc/cmd/version_test.go @@ -27,9 +27,8 @@ func TestJsonVersion(t *testing.T) { Version: "1.13", Commit: "aabbcc", OpenshiftVersion: "4.5.4", - PodmanVersion: "3.4.4", }, "json")) - expected := `{"version": "1.13", "commit": "aabbcc", "openshiftVersion": "4.5.4", "podmanVersion": "3.4.4"}` + expected := `{"version": "1.13", "commit": "aabbcc", "openshiftVersion": "4.5.4"}` assert.JSONEq(t, expected, out.String()) } diff --git a/pkg/crc/api/api_client_test.go b/pkg/crc/api/api_client_test.go index ad485e617e..f3c7128677 100644 --- a/pkg/crc/api/api_client_test.go +++ b/pkg/crc/api/api_client_test.go @@ -51,7 +51,6 @@ func TestVersion(t *testing.T) { CrcVersion: version.GetCRCVersion(), OpenshiftVersion: version.GetBundleVersion(preset.OpenShift), CommitSha: version.GetCommitSha(), - PodmanVersion: version.GetBundleVersion(preset.Podman), }, vr, ) diff --git a/pkg/crc/api/api_http_test.go b/pkg/crc/api/api_http_test.go index 859bccc3e6..b2a7521b84 100644 --- a/pkg/crc/api/api_http_test.go +++ b/pkg/crc/api/api_http_test.go @@ -265,7 +265,7 @@ var testCases = []testCase{ // version { request: get("version"), - response: jSon(fmt.Sprintf(`{"CrcVersion":"%s","CommitSha":"%s","OpenshiftVersion":"%s","PodmanVersion":"%s"}`, version.GetCRCVersion(), version.GetCommitSha(), version.GetBundleVersion(preset.OpenShift), version.GetBundleVersion(preset.Podman))), + response: jSon(fmt.Sprintf(`{"CrcVersion":"%s","CommitSha":"%s","OpenshiftVersion":"%s"}`, version.GetCRCVersion(), version.GetCommitSha(), version.GetBundleVersion(preset.OpenShift))), }, // version never fails diff --git a/pkg/crc/api/client/types.go b/pkg/crc/api/client/types.go index d7c2ac75a5..590f1e9b97 100644 --- a/pkg/crc/api/client/types.go +++ b/pkg/crc/api/client/types.go @@ -10,7 +10,6 @@ type VersionResult struct { CrcVersion string CommitSha string OpenshiftVersion string - PodmanVersion string } type StartResult struct { diff --git a/pkg/crc/api/handlers.go b/pkg/crc/api/handlers.go index 04ecedf042..35e1658a0a 100644 --- a/pkg/crc/api/handlers.go +++ b/pkg/crc/api/handlers.go @@ -139,7 +139,6 @@ func (h *Handler) GetVersion(c *context) error { CrcVersion: version.GetCRCVersion(), CommitSha: version.GetCommitSha(), OpenshiftVersion: version.GetBundleVersion(preset.OpenShift), - PodmanVersion: version.GetBundleVersion(preset.Podman), }) }