Skip to content

Validator inserts extra newlines between Objects #360

Closed
@annasong20

Description

@annasong20

What happened:

Validator expects empty lines before and after each document separator --- in the expected output manifests that I specify in "*.out.yaml".

#example.out.yaml
apiVersion: v1
kind: Namespace
metadata:
  name: x

---

apiVersion: v1
kind: Namespace
metadata:
  name: y

What you expected to happen:

I expected that I should be able to specify consecutive objects in my "*.out.yaml" file without the extra newlines.

#example.out.yaml
apiVersion: v1
kind: Namespace
metadata:
  name: x
---
apiVersion: v1
kind: Namespace
metadata:
  name: y

How to reproduce it (as minimally and precisely as possible):

You can see that the existing guestbook test with validator

expects newlines before and after each document separator

Anything else we need to know?:

This line

that adds additional newlines, even though yamilzer.Encode already adds a newline after the object, is likely the culprit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions