misc: remove unnecessary use of fmt.Sprintf

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
Hidde Beydals 2023-10-09 12:13:06 +02:00
parent 25400d8810
commit 8d1c755dd1
No known key found for this signature in database
GPG Key ID: 979F380FC2341744
2 changed files with 3 additions and 3 deletions

View File

@ -258,7 +258,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
name: "notices missing artifact in storage",
beforeFunc: func(obj *bucketv1.Bucket, storage *Storage) error {
obj.Status.Artifact = &sourcev1.Artifact{
Path: fmt.Sprintf("/reconcile-storage/invalid.txt"),
Path: "/reconcile-storage/invalid.txt",
Revision: "d",
}
storage.SetArtifactURL(obj.Status.Artifact)
@ -339,7 +339,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
name: "updates hostname on diff from current",
beforeFunc: func(obj *bucketv1.Bucket, storage *Storage) error {
obj.Status.Artifact = &sourcev1.Artifact{
Path: fmt.Sprintf("/reconcile-storage/hostname.txt"),
Path: "/reconcile-storage/hostname.txt",
Revision: "f",
Digest: "sha256:3b9c358f36f0a31b6ad3e14f309c7cf198ac9246e8316f9ce543d5b19ac02b80",
URL: "http://outdated.com/reconcile-storage/hostname.txt",

View File

@ -521,7 +521,7 @@ func (r *GitRepositoryReconciler) reconcileSource(ctx context.Context, sp *patch
// Observe if the artifacts still match the previous included ones
if artifacts.Diff(obj.Status.IncludedArtifacts) {
message := fmt.Sprintf("included artifacts differ from last observed includes")
message := "included artifacts differ from last observed includes"
if obj.Status.IncludedArtifacts != nil {
conditions.MarkTrue(obj, sourcev1.ArtifactOutdatedCondition, "IncludeChange", message)
}