name: "Returns an error when there are conflicting definitions of workspace env var"

input:
  devworkspace:
    components:
      - name: test-container
        attributes:
          workspaceEnv:
            - name: TEST_ENV_2
              value: NOT_TEST_VAL_2
        container:
          image: test-image
      - name: test-plugin
        plugin:
          uri: "https://my-plugin.io/test"
  devfileResources:
    "https://my-plugin.io/test":
      schemaVersion: 2.0.0
      metadata:
        name: "plugin-a"
      components:
        - name: plugin-a
          attributes:
            workspaceEnv:
            - name: TEST_ENV_1
              value: TEST_VAL_1
            - name: TEST_ENV_2
              value: TEST_VAL_2
          container:
            name: test-container
            image: test-image

output:
  errRegexp: "failed to process workspaceEnv: conflicting definition of environment variable TEST_ENV_2 in components 'test-plugin' and 'test-container'"
