name: "Annotates resources merged into devfile with source attribute"

input:
  devworkspace:
    parent:
      kubernetes:
        name: test-parent-k8s
    components:
      - name: test-plugin
        plugin:
          uri: https://test-plugin.io/test-plugin
  devworkspaceResources:
    test-parent-k8s:
      kind: DevWorkspaceTemplate
      apiVersion: workspace.devfile.io/v1alpha2
      metadata:
        name: parent-devworkspacetemplate
        annotations:
          "controller.devfile.io/allow-import-from": "*"
      spec:
        projects:
          - name: parent-project
        starterProjects:
          - name: parent-starter-project
        components:
          - name: parent-component
            container:
              image: test-img
        commands:
          - id: parent-command
  devfileResources:
    "https://test-plugin.io/test-plugin":
      schemaVersion: 2.1.0
      metadata:
        name: test-plugin
      components:
        - name: plugin-component
          container:
            image: plugin-img
      commands:
        - id: plugin-command
output:
  devworkspace:
    projects:
      - name: parent-project
        attributes:
          controller.devfile.io/imported-by: parent
    starterProjects:
      - name: parent-starter-project
        attributes:
          controller.devfile.io/imported-by: parent
    components:
      - name: parent-component
        attributes:
          controller.devfile.io/imported-by: parent
        container:
          image: test-img
      - name: plugin-component
        attributes:
          controller.devfile.io/imported-by: test-plugin
        container:
          image: plugin-img
    commands:
      - id: parent-command
        attributes:
          controller.devfile.io/imported-by: parent
      - id: plugin-command
        attributes:
          controller.devfile.io/imported-by: test-plugin
