name: "Returns an error when workspaceEnv cannot be read as []EnvVar"

input:
  devworkspace:
    components:
      - 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:
            # Note this fails to deserialize because it's just a yaml string, not a list.
            # JSON can be used here if you remove the pipe
            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 read attribute workspaceEnv on component test-plugin"
