add a .gdignore when validating addons cache#207
Open
WahahaYes wants to merge 3 commits intochickensoft-games:mainfrom
Open
add a .gdignore when validating addons cache#207WahahaYes wants to merge 3 commits intochickensoft-games:mainfrom
WahahaYes wants to merge 3 commits intochickensoft-games:mainfrom
Conversation
Author
|
I did not expect this to introduce build issues. I’ll take a look at you all’s test structure and see what’s conflicting |
Contributor
|
Hi, thanks! There's no |
Author
|
Whoops! I obviously didn’t run tests. I’ll fix this next time I’m sat down at my laptop and learn how to test locally. I’m not familiar with dotnet |
Member
|
The test probably passes already, but for clarity we should likely mock and test the added behavior of EnsureCacheAndAddonsDirectoriesExists() in AddonsRepoTest: |
Author
|
Hi @wlsnmrk @jolexxa , sorry it took me a long time to circle back to this, but added mock behavior here: [Fact]
public void EnsuresExistsCreatesCacheDir()
{
var subject = BuildSubject();
var repo = subject.Repo;
var client = subject.Client;
client.Setup(c => c.DirectoryExists(CACHE_DIR)).Returns(false);
client.Setup(c => c.Combine(CACHE_DIR, ".gdignore")).Returns("/.addons/.gdignore");
client.Setup(c => c.CreateFile("/.addons/.gdignore", ""));
repo.EnsureCacheAndAddonsDirectoriesExists();
client.VerifyAll();
}When I run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #200 , I had an issue where Godot was trying to parse files in
.addonsand seeing duplicate classes to what is inaddons. Most users don't have this problem but including a.gdignoreshouldn't have any negative effect.