From 77f7bf9a9c0b97c83baa46ceb297d875acff49e9 Mon Sep 17 00:00:00 2001
From: Brent Baude <bbaude@redhat.com>
Date: Tue, 4 Aug 2020 12:52:45 -0500
Subject: [PATCH] podman-remote send name and tag

when loading an image with podman-remote load, we need to send a name and a tag to the endpoint

Fixes: #7124

Signed-off-by: Brent Baude <bbaude@redhat.com>
---
 pkg/domain/infra/tunnel/images.go | 6 +++++-
 test/system/120-load.bats         | 2 --
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 6845d01c0a..c7bfdcd2ba 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -196,7 +196,11 @@ func (ir *ImageEngine) Load(ctx context.Context, opts entities.ImageLoadOptions)
 		return nil, err
 	}
 	defer f.Close()
-	return images.Load(ir.ClientCxt, f, &opts.Name)
+	ref := opts.Name
+	if len(opts.Tag) > 0 {
+		ref += ":" + opts.Tag
+	}
+	return images.Load(ir.ClientCxt, f, &ref)
 }
 
 func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOptions) (*entities.ImageImportReport, error) {
diff --git a/test/system/120-load.bats b/test/system/120-load.bats
index ccfbc51ca0..4825eed078 100644
--- a/test/system/120-load.bats
+++ b/test/system/120-load.bats
@@ -77,8 +77,6 @@ verify_iid_and_name() {
 }
 
 @test "podman load - NAME and NAME:TAG arguments work" {
-    skip_if_remote "FIXME: pending #7124"
-
     get_iid_and_name
     run_podman save $iid -o $archive
     run_podman rmi $iid