diff options
author | Jhon Honce <jhonce@redhat.com> | 2021-03-03 10:47:02 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2021-03-03 17:03:19 -0700 |
commit | f86d64130838fbeb75ea2776a2f2b6c4a49e58b3 (patch) | |
tree | 232fa1410600b9ed11f66d81d6d13f97e16c35c4 /pkg/api/handlers/utils/handler_test.go | |
parent | 87e20560ac885c541784af1341098ce8e1e7a940 (diff) | |
download | podman-f86d64130838fbeb75ea2776a2f2b6c4a49e58b3.tar.gz podman-f86d64130838fbeb75ea2776a2f2b6c4a49e58b3.tar.bz2 podman-f86d64130838fbeb75ea2776a2f2b6c4a49e58b3.zip |
Use version package to track all versions
* Server, bindings, and CLI all now pull version information from version
package.
* Current /libpod API version slaved to podman/libpod Version
* Bindings validate against libpod API Minimal version
* Remove pkg/bindings/bindings.go and updated tests
Fixes: #9207
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api/handlers/utils/handler_test.go')
-rw-r--r-- | pkg/api/handlers/utils/handler_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/api/handlers/utils/handler_test.go b/pkg/api/handlers/utils/handler_test.go index d9fd22b80..18a1d2678 100644 --- a/pkg/api/handlers/utils/handler_test.go +++ b/pkg/api/handlers/utils/handler_test.go @@ -7,17 +7,18 @@ import ( "net/http/httptest" "testing" + "github.com/containers/podman/v3/version" "github.com/gorilla/mux" ) func TestSupportedVersion(t *testing.T) { req, err := http.NewRequest("GET", - fmt.Sprintf("/v%s/libpod/testing/versions", APIVersion[LibpodTree][CurrentAPIVersion]), + fmt.Sprintf("/v%s/libpod/testing/versions", version.APIVersion[version.Libpod][version.CurrentAPI]), nil) if err != nil { t.Fatal(err) } - req = mux.SetURLVars(req, map[string]string{"version": APIVersion[LibpodTree][CurrentAPIVersion].String()}) + req = mux.SetURLVars(req, map[string]string{"version": version.APIVersion[version.Libpod][version.CurrentAPI].String()}) rr := httptest.NewRecorder() handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |