Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -18,7 +18,6 @@ var (
|
||||
|
||||
func TestDashboardsAsConfig(t *testing.T) {
|
||||
t.Run("Dashboards as configuration", func(t *testing.T) {
|
||||
|
||||
logger := log.New("test-logger")
|
||||
|
||||
t.Run("default values should be applied", func(t *testing.T) {
|
||||
|
||||
@@ -65,7 +65,6 @@ func NewDashboardFileReader(cfg *config, log log.Logger) (*FileReader, error) {
|
||||
|
||||
// pollChanges periodically runs startWalkingDisk based on interval specified in the config.
|
||||
func (fr *FileReader) pollChanges(ctx context.Context) {
|
||||
|
||||
ticker := time.NewTicker(time.Duration(int64(time.Second) * fr.Cfg.UpdateIntervalSeconds))
|
||||
for {
|
||||
select {
|
||||
|
||||
@@ -96,7 +96,6 @@ func TestDashboardFileReader(t *testing.T) {
|
||||
logger := log.New("test.logger")
|
||||
|
||||
Convey("Reading dashboards from disk", func() {
|
||||
|
||||
cfg := &config{
|
||||
Name: "Default",
|
||||
Type: "file",
|
||||
@@ -342,7 +341,6 @@ func TestDashboardFileReader(t *testing.T) {
|
||||
|
||||
So(len(fakeService.provisioned["Default"]), ShouldEqual, 1)
|
||||
So(fakeService.provisioned["Default"][0].ExternalId, ShouldEqual, absPath1)
|
||||
|
||||
})
|
||||
|
||||
Convey("Missing dashboard should be deleted if DisableDeletion = false", func() {
|
||||
|
||||
@@ -70,7 +70,6 @@ func (dc *NotificationProvisioner) deleteNotifications(notificationToDelete []*d
|
||||
|
||||
func (dc *NotificationProvisioner) mergeNotifications(notificationToMerge []*notificationFromConfig) error {
|
||||
for _, notification := range notificationToMerge {
|
||||
|
||||
if notification.OrgID == 0 && notification.OrgName != "" {
|
||||
getOrg := &models.GetOrgByNameQuery{Name: notification.OrgName}
|
||||
if err := bus.Dispatch(getOrg); err != nil {
|
||||
|
||||
@@ -140,7 +140,6 @@ func validateRequiredField(notifications []*notificationsAsConfig) error {
|
||||
}
|
||||
|
||||
func validateNotifications(notifications []*notificationsAsConfig) error {
|
||||
|
||||
for i := range notifications {
|
||||
if notifications[i].Notifications == nil {
|
||||
continue
|
||||
|
||||
@@ -257,7 +257,6 @@ func TestNotificationAsConfig(t *testing.T) {
|
||||
nt := notificationsQuery.Result[0]
|
||||
So(nt.Name, ShouldEqual, "default-notification-create")
|
||||
So(nt.OrgId, ShouldEqual, existingOrg2.Result.Id)
|
||||
|
||||
})
|
||||
|
||||
Convey("Config doesn't contain required field", func() {
|
||||
|
||||
@@ -89,7 +89,6 @@ func (ps *provisioningServiceImpl) Run(ctx context.Context) error {
|
||||
}
|
||||
|
||||
for {
|
||||
|
||||
// Wait for unlock. This is tied to new dashboardProvisioner to be instantiated before we start polling.
|
||||
ps.mutex.Lock()
|
||||
// Using background here because otherwise if root context was canceled the select later on would
|
||||
|
||||
@@ -37,7 +37,6 @@ func TestProvisioningServiceImpl(t *testing.T) {
|
||||
|
||||
assert.False(t, serviceTest.serviceRunning, "Service should not be running")
|
||||
assert.Equal(t, context.Canceled, serviceTest.serviceError, "Service should have returned canceled error")
|
||||
|
||||
})
|
||||
|
||||
t.Run("Failed reloading does not stop polling with old provisioned", func(t *testing.T) {
|
||||
|
||||
@@ -124,7 +124,6 @@ func TestValues(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("JSONValue", func() {
|
||||
|
||||
type Data struct {
|
||||
Val JSONValue `yaml:"val"`
|
||||
}
|
||||
@@ -237,7 +236,6 @@ func TestValues(t *testing.T) {
|
||||
"three": "$STRING",
|
||||
"four": "true",
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user