Skip to content

💣 Bug: CI Workflow Failed in configmanager Package #1311

@daniel-hutao

Description

@daniel-hutao

What Happened?

PipelineTemplate struct
/Users/danielhu/DevStream/devstream/internal/pkg/configmanager/pipelinetemplate_test.go:184
  generatePipelineTool method
  /Users/danielhu/DevStream/devstream/internal/pkg/configmanager/pipelinetemplate_test.go:204
    when pipeline type is valid
    /Users/danielhu/DevStream/devstream/internal/pkg/configmanager/pipelinetemplate_test.go:215
      [It] should return tool
      /Users/danielhu/DevStream/devstream/internal/pkg/configmanager/pipelinetemplate_test.go:224

  Expected
      <*configmanager.Tool | 0x140000c5d80>: {
          Name: "github-actions",
          InstanceID: "test_app",
          DependsOn: [],
          Options: {
              "pipeline": <configmanager.RawOptions | len:2>{
                  "test": <string>"testV",
                  "configLocation": <string>"https://raw.githubusercontent.com/devstream-io/ci-template/main/github-actions/workflows/main.yml",
              },
              "scm": <configmanager.RawOptions | len:1>{
                  "url": <string>"http://test.com",
              },
          },
      }
  to equal
      <*configmanager.Tool | 0x140000c5e80>: {
          Name: "github-actions",
          InstanceID: "test_app",
          DependsOn: [],
          Options: {
              "pipeline": <configmanager.RawOptions | len:2>{
                  "test": <string>"testV",
                  "configLocation": <string>"git@github.com:devstream-io/ci-template.git//github-actions",
              },
              "scm": <configmanager.RawOptions | len:1>{
                  "url": <string>"http://test.com",
              },
          },
      }
  In [It] at: /Users/danielhu/DevStream/devstream/internal/pkg/configmanager/pipelinetemplate_test.go:227

...
  Expected
      <*configmanager.Tool | 0x1400092bd80>: {
          Name: "github-actions",
          InstanceID: "service-a",
          DependsOn: [
              "repo-scaffolding.service-a",
              "plugin1.default",
              "plugin2.tluafed",
          ],
          Options: {
              "pipeline": <configmanager.RawOptions | len:4>{
                  "configLocation": <string>"https://raw.githubusercontent.com/devstream-io/ci-template/main/github-actions/workflows/main.yml",
                  "language": <configmanager.RawOptions | len:2>{
                      "framework": <string>"django",
                      "name": <string>"python",
                  },
                  "branch": <string>"main",
                  "docker": <configmanager.RawOptions | len:1>{
                      "registry": <configmanager.RawOptions | len:3>{
                          "type": <string>"dockerhub",
                          "username": <string>"dockerUser1",
                          "repository": <string>"service-a",
                      },
                  },
              },
              "scm": <configmanager.RawOptions | len:6>{
                  "owner": <string>"devstream-io",
                  "org": <string>"devstream-io",
                  "name": <string>"service-a",
                  "scmType": <string>"github",
                  "url": <string>"https://github.com/devstream-io/service-a",
                  "apiURL": <string>"gitlab.com/some/path/to/your/api",
              },
              "instanceID": <string>"service-a",
          },
      }
  to equal
      <*configmanager.Tool | 0x1400092b640>: {
          Name: "github-actions",
          InstanceID: "service-a",
          DependsOn: [
              "repo-scaffolding.service-a",
              "plugin1.default",
              "plugin2.tluafed",
          ],
          Options: {
              "instanceID": <string>"service-a",
              "pipeline": <configmanager.RawOptions | len:4>{
                  "language": <configmanager.RawOptions | len:2>{
                      "name": <string>"python",
                      "framework": <string>"django",
                  },
                  "docker": <configmanager.RawOptions | len:1>{
                      "registry": <configmanager.RawOptions | len:3>{
                          "repository": <string>"service-a",
                          "type": <string>"dockerhub",
                          "username": <string>"dockerUser1",
                      },
                  },
                  "branch": <string>"main",
                  "configLocation": <string>"git@github.com:devstream-io/ci-template.git//github-actions",
              },
              "scm": <configmanager.RawOptions | len:6>{
                  "apiURL": <string>"gitlab.com/some/path/to/your/api",
                  "owner": <string>"devstream-io",
                  "org": <string>"devstream-io",
                  "name": <string>"service-a",
                  "scmType": <string>"github",
                  "url": <string>"https://github.com/devstream-io/service-a",
              },
          },
      }
  In [It] at: /Users/danielhu/DevStream/devstream/internal/pkg/configmanager/configmanager_test.go:249
------------------------------
•••••••


Summarizing 2 Failures:
  [FAIL] PipelineTemplate struct generatePipelineTool method when pipeline type is valid [It] should return tool
  /Users/danielhu/DevStream/devstream/internal/pkg/configmanager/pipelinetemplate_test.go:227
  [FAIL] LoadConfig when load a config file [It] should return  tools
  /Users/danielhu/DevStream/devstream/internal/pkg/configmanager/configmanager_test.go:249

Ran 39 of 39 Specs in 0.006 seconds
FAIL! -- 37 Passed | 2 Failed | 0 Pending | 0 Skipped

How to Reproduce?

go test

Anything else

/assign @ste

DevStream Version

latest

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions