Commit f58f1f56 authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

op-deployer: Marshal tag-based ArtifactsLocator with correct scheme (#12494)

parent da6625f5
......@@ -45,7 +45,7 @@ func (a *ArtifactsLocator) MarshalText() ([]byte, error) {
}
if a.Tag != "" {
return []byte(a.Tag), nil
return []byte("tag://" + a.Tag), nil
}
return nil, fmt.Errorf("no URL, path or tag set")
......
......@@ -79,6 +79,10 @@ func TestArtifactsLocator_Marshaling(t *testing.T) {
}
require.NoError(t, err)
require.Equal(t, tt.out, &a)
marshalled, err := a.MarshalText()
require.NoError(t, err)
require.Equal(t, tt.in, string(marshalled))
})
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment