Skip to content

Conversation

@davepacheco
Copy link
Collaborator

It looks like #1795 renamed gateway/tests/output/cmd-gateway-openapi-stderr to gateway/tests/output/cmd-mgs-openapi-stderr but did not rename the file in git. It's an empty file that represents the expected stderr from a shell command. The test uses expectorate to make sure it's empty:

assert_contents("tests/output/cmd-mgs-openapi-stderr", &stderr_text);

This works even though the file is not checked into git because expectorate considers a missing file equivalent to an empty file. The only problem I'm really fixing here is that if you do a fresh clone and run the test suite, git status reports this untracked file.

@jgallagher
Copy link
Contributor

Nice catch, but I'm a little confused on this:

The only problem I'm really fixing here is that if you do a fresh clone and run the test suite, git status reports this untracked file.

Running the test suite shouldn't create this file, right? I'm not seeing it show up locally and am not sure how it would.

Should the check in the test should be assert!(stderr_text.is_empty()) instead of checking against an empty file, and we just remove this altogether?

@jgallagher
Copy link
Contributor

Ahh, I see, it gets created if we run the test suite with EXPECTORATE=overwrite.

@davepacheco davepacheco merged commit 8bff660 into main Oct 21, 2022
@davepacheco davepacheco deleted the untracked-empty-file branch October 21, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants