Skip to content

Commit

Permalink
lint engine
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Oct 17, 2024
1 parent 6edc128 commit 84a31f2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ import (
"github.com/sirupsen/logrus"
)

const (
oneWeek = 7 * 24 * time.Hour
)

// StreamLogsStrategyImpl pulls logs from filesystem where there is a log file per year, per week, per enclave, per service
// Weeks are denoted 01-52
// e.g.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,18 @@ package stream_logs_strategy

import (
"bufio"
"fmt"
"github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/file_layout"
"github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/logs_clock"
"github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts"
"github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/logline"
"github.com/stretchr/testify/require"
"io"
"strconv"
"strings"
"testing"
"time"
)

const (
testEnclaveUuid = "test-enclave"
testUserService1Uuid = "test-user-service-1"

retentionPeriodInWeeksForTesting = 5
)

Expand All @@ -42,12 +37,6 @@ func TestIsWithinRetentionPeriod(t *testing.T) {
require.False(t, isWithinRetentionPeriod)
}

func getWeekFilepathStr(year, week int) string {
// %02d to format week num with leading zeros so 1-9 are converted to 01-09 for %V format
formattedWeekNum := fmt.Sprintf("%02d", week)
return fmt.Sprintf(file_layout.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(year), formattedWeekNum, testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype)
}

func TestGetCompleteJsonLogString(t *testing.T) {
logLine1 := "{\"log\":\"Starting feature 'runs idempotently'\"}"
logLine2a := "{\"log\":\"Starting feature 'apic "
Expand Down

0 comments on commit 84a31f2

Please sign in to comment.