Skip to content

Provide Mock Interface for Devfile Downloads on devfile/library  #1221

Closed
devfile/library
#189

Description

@kim-tsao

/kind user-story

Which area this user story is related to?

/area library

User Story

As a devfile library client, I want to mock test devfile downloads from a private repo so I can test my client code properly.

From the investigation that was done in #1216 (comment), we need to fix the DownloadInMemory function to:

  1. Error out when we receive an unsupported git vendor URL

  2. Convert the function to a method so tooling clients can write mock tests

  3. See what the impact is for the following scenarios:

    1. Setting the devfile content in context.Populate/PopulateURL - which would require mocking of these two methods as well
    2. Converting K8s URI to inline
    3. Reading the Kubernetes yaml for outerloop support, affecting our client usage.

Acceptance Criteria

  • Create/Update test cases and ensure they run on both happy path and error scenarios
  • If there's API breakage, ensure the old methods/functions are marked deprecated
  • Update documentation
  • ....
  • ....

Activity

  1. self-assigned this
    on Aug 14, 2023
  2. added this to Devfile Project and removed this from Devfile Projecton Aug 14, 2023
  3. moved this to To Do 📝 in Devfile Projecton Aug 21, 2023
  4. moved this from To Do 📝 to Backlog in Devfile Projecton Sep 18, 2023
  5. github-actions commented on Nov 13, 2023

    @github-actions

    This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.

  6. removed
    lifecycle/staleStale items. These items have not been updated for 90 days.
    on Nov 14, 2023
  7. self-assigned this
    on Nov 16, 2023
  8. moved this from Backlog to In Progress 🚧 in Devfile Projecton Nov 16, 2023
  9. maysunfaisal commented on Nov 20, 2023

    @maysunfaisal
    Member

    Error out when we receive an unsupported git vendor URL

    Thought about this, but we should not error out in these situations and treat such git vendors as regular URLs and attempt a best case regular GET like other URLs

  10. moved this from In Progress 🚧 to In Review 👀 in Devfile Projecton Nov 20, 2023
  11. moved this from In Review 👀 to Done ✅ in Devfile Projecton Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/libraryCommon devfile library for interacting with devfileskind/user-storyUser story for new enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions