Skip to content

Commit

Permalink
string interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
dudo committed May 13, 2024
1 parent 47410c4 commit 7a56524
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/annotations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package pkg

import (
"encoding/json"
"fmt"
"os"
"strconv"
"testing"
Expand Down Expand Up @@ -88,7 +89,7 @@ func TestGetCronitorID(t *testing.T) {
}
annotations += tc.annotationCronitorID

jsonBlob := `{
jsonBlob := fmt.Sprintf(`{
"apiVersion": "batch/v1beta1",
"kind": "CronJob",
"metadata": {
Expand Down Expand Up @@ -121,7 +122,7 @@ func TestGetCronitorID(t *testing.T) {
},
"schedule": "*/1 * * * *"
}
}`
}`, annotations)

var cronJob v1.CronJob
err := json.Unmarshal([]byte(jsonBlob), &cronJob)
Expand Down Expand Up @@ -178,7 +179,7 @@ func TestGetCronitorName(t *testing.T) {
}
annotations += tc.annotationCronitorName

jsonBlob := `{
jsonBlob := fmt.Sprintf(`{
"apiVersion": "batch/v1beta1",
"kind": "CronJob",
"metadata": {
Expand Down Expand Up @@ -211,7 +212,7 @@ func TestGetCronitorName(t *testing.T) {
},
"schedule": "*/1 * * * *"
}
}`
}`, annotations)

var cronJob v1.CronJob
err := json.Unmarshal([]byte(jsonBlob), &cronJob)
Expand Down

0 comments on commit 7a56524

Please sign in to comment.