misc: remove unnecessary use of fmt.Sprintf
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
parent
25400d8810
commit
8d1c755dd1
|
@ -258,7 +258,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
|
||||||
name: "notices missing artifact in storage",
|
name: "notices missing artifact in storage",
|
||||||
beforeFunc: func(obj *bucketv1.Bucket, storage *Storage) error {
|
beforeFunc: func(obj *bucketv1.Bucket, storage *Storage) error {
|
||||||
obj.Status.Artifact = &sourcev1.Artifact{
|
obj.Status.Artifact = &sourcev1.Artifact{
|
||||||
Path: fmt.Sprintf("/reconcile-storage/invalid.txt"),
|
Path: "/reconcile-storage/invalid.txt",
|
||||||
Revision: "d",
|
Revision: "d",
|
||||||
}
|
}
|
||||||
storage.SetArtifactURL(obj.Status.Artifact)
|
storage.SetArtifactURL(obj.Status.Artifact)
|
||||||
|
@ -339,7 +339,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
|
||||||
name: "updates hostname on diff from current",
|
name: "updates hostname on diff from current",
|
||||||
beforeFunc: func(obj *bucketv1.Bucket, storage *Storage) error {
|
beforeFunc: func(obj *bucketv1.Bucket, storage *Storage) error {
|
||||||
obj.Status.Artifact = &sourcev1.Artifact{
|
obj.Status.Artifact = &sourcev1.Artifact{
|
||||||
Path: fmt.Sprintf("/reconcile-storage/hostname.txt"),
|
Path: "/reconcile-storage/hostname.txt",
|
||||||
Revision: "f",
|
Revision: "f",
|
||||||
Digest: "sha256:3b9c358f36f0a31b6ad3e14f309c7cf198ac9246e8316f9ce543d5b19ac02b80",
|
Digest: "sha256:3b9c358f36f0a31b6ad3e14f309c7cf198ac9246e8316f9ce543d5b19ac02b80",
|
||||||
URL: "http://outdated.com/reconcile-storage/hostname.txt",
|
URL: "http://outdated.com/reconcile-storage/hostname.txt",
|
||||||
|
|
|
@ -521,7 +521,7 @@ func (r *GitRepositoryReconciler) reconcileSource(ctx context.Context, sp *patch
|
||||||
|
|
||||||
// Observe if the artifacts still match the previous included ones
|
// Observe if the artifacts still match the previous included ones
|
||||||
if artifacts.Diff(obj.Status.IncludedArtifacts) {
|
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 {
|
if obj.Status.IncludedArtifacts != nil {
|
||||||
conditions.MarkTrue(obj, sourcev1.ArtifactOutdatedCondition, "IncludeChange", message)
|
conditions.MarkTrue(obj, sourcev1.ArtifactOutdatedCondition, "IncludeChange", message)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue