Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Decouple unit tests from "get.keptn.sh/version.json" #3476

Closed
1 task
johannes-b opened this issue Mar 9, 2021 · 0 comments · Fixed by #3654
Closed
1 task

Decouple unit tests from "get.keptn.sh/version.json" #3476

johannes-b opened this issue Mar 9, 2021 · 0 comments · Fixed by #3654
Assignees
Labels
estimate: 1 test type:chore Provides value to the (dev) team
Milestone

Comments

@johannes-b
Copy link
Member

johannes-b commented Mar 9, 2021

The unit test as implemented in pkg/version use the URL get.keptn.sh/version.json see

Task

  • Decouple the unit tests from the URL get.keptn.sh/version.json to not call it
  • Identify the spots in the CLI in which this URL is called (e.g., root cmd, upgrade, version, install, etc.)
  • Use dependency injection to control this encapsulation
  • Mock the call to this URL in the unit tests

Definition of done:

  • Unit tests do not call: get.keptn.sh/version.json
@johannes-b johannes-b added type:chore Provides value to the (dev) team test ready-for-refinement Issue is relevant for the next backlog refinment labels Mar 9, 2021
@johannes-b johannes-b added this to the 0.8.1 milestone Mar 9, 2021
@johannes-b johannes-b added this to Ready for refinement in Refinement board Mar 9, 2021
@johannes-b johannes-b moved this from Ready for refinement to Refined and prioritized (Core) in Refinement board Mar 9, 2021
@johannes-b johannes-b added next-sprint Items that should be discussed and implemented in the next sprint and removed ready-for-refinement Issue is relevant for the next backlog refinment labels Mar 9, 2021
@johannes-b johannes-b modified the milestones: 0.8.1, 0.8.2 Mar 22, 2021
@johannes-b johannes-b added this to To do in Sprint 216 [26/3 - 9/4] via automation Mar 26, 2021
@johannes-b johannes-b removed this from Refined and prioritized (Core) in Refinement board Mar 26, 2021
@bacherfl bacherfl self-assigned this Mar 29, 2021
@bacherfl bacherfl moved this from To do to In progress in Sprint 216 [26/3 - 9/4] Mar 29, 2021
@bacherfl bacherfl moved this from In progress to To do in Sprint 216 [26/3 - 9/4] Mar 29, 2021
@bacherfl bacherfl removed their assignment Mar 29, 2021
@warber warber moved this from To do to In progress in Sprint 216 [26/3 - 9/4] Mar 29, 2021
@warber warber self-assigned this Mar 29, 2021
@johannes-b johannes-b removed the next-sprint Items that should be discussed and implemented in the next sprint label Mar 29, 2021
@warber warber removed their assignment Mar 29, 2021
@warber warber moved this from In progress to To do in Sprint 216 [26/3 - 9/4] Mar 29, 2021
@johannes-b johannes-b added the next-sprint Items that should be discussed and implemented in the next sprint label Mar 29, 2021
@bacherfl bacherfl self-assigned this Mar 30, 2021
@bacherfl bacherfl moved this from To do to In progress in Sprint 216 [26/3 - 9/4] Mar 30, 2021
bacherfl added a commit that referenced this issue Mar 30, 2021
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
bacherfl added a commit that referenced this issue Mar 30, 2021
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
bacherfl added a commit that referenced this issue Mar 30, 2021
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
@johannes-b johannes-b removed the next-sprint Items that should be discussed and implemented in the next sprint label Mar 30, 2021
@bacherfl bacherfl moved this from In progress to Ready for review in Sprint 216 [26/3 - 9/4] Mar 31, 2021
bacherfl added a commit that referenced this issue Apr 1, 2021
* make versionFetcherClient injectable

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* make versionFetcherClient injectable

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* #3476 golint remarks

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* #3476 fixed failing test

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>

* #3476 fixed failing test

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
@johannes-b johannes-b moved this from Ready for review to Done in Sprint 216 [26/3 - 9/4] Apr 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
estimate: 1 test type:chore Provides value to the (dev) team
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants