aports/testing/timoni/fix-mod-push-test.patch
2025-01-10 22:49:22 +00:00

18 lines
1.1 KiB
Diff

The mod push command before these asserts doesn't specify 'revision' and
'source' annotations. In this case, timoni will infer the annotations from the
git metadata the module is in. We don't build the package in a git repo, so the
module ends up in the registry with these annotations undefined.
diff --git a/cmd/timoni/mod_push_test.go b/cmd/timoni/mod_push_test.go
index 14f5b4f..945df85 100644
--- a/cmd/timoni/mod_push_test.go
+++ b/cmd/timoni/mod_push_test.go
@@ -61,8 +61,6 @@ func Test_PushMod(t *testing.T) {
// Verify that annotations exist in manifest
g.Expect(manifest.Annotations[apiv1.CreatedAnnotation]).ToNot(BeEmpty())
- g.Expect(manifest.Annotations[apiv1.RevisionAnnotation]).ToNot(BeEmpty())
- g.Expect(manifest.Annotations[apiv1.SourceAnnotation]).To(ContainSubstring("github.com"))
g.Expect(manifest.Annotations[apiv1.VersionAnnotation]).To(BeEquivalentTo(modVer))
g.Expect(manifest.Annotations["org.opencontainers.image.licenses"]).To(BeEquivalentTo("Apache-2.0"))
g.Expect(manifest.Annotations["org.opencontainers.image.description"]).To(BeEquivalentTo("My, test."))