dotcloud/docker

View on GitHub
daemon/logger/loggertest/logreader.go

Summary

Maintainability
C
1 day
Test Coverage

Method Reader.TestFollow has 173 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (tr Reader) TestFollow(t *testing.T) {
    // Reader sends all logs and closes after logger is closed
    // - Starting from empty log (like run)
    for i, tail := range []int{-1, 0, 1, 42} {
        i, tail := i, tail
Severity: Major
Found in daemon/logger/loggertest/logreader.go - About 5 hrs to fix

    Method Reader.testTail has 71 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (tr Reader) testTail(t *testing.T, live bool) {
        t.Parallel()
        factory := tr.Factory(t, logger.Info{
            ContainerID:   "tailtest0000",
            ContainerName: "logtail",
    Severity: Minor
    Found in daemon/logger/loggertest/logreader.go - About 1 hr to fix

      Method Reader.TestConcurrent has 58 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (tr Reader) TestConcurrent(t *testing.T) {
          t.Parallel()
          l := tr.Factory(t, logger.Info{
              ContainerID:   "logconcurrent0",
              ContainerName: "logconcurrent123",
      Severity: Minor
      Found in daemon/logger/loggertest/logreader.go - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status