105 references to PipelineOutputDiffMode
Aspire.Hosting (6)
Pipelines\DefaultPipelineOutputSnapshotter.cs (4)
19private readonly PipelineOutputDiffMode _mode; 57var git = _mode is PipelineOutputDiffMode.Auto or PipelineOutputDiffMode.Git 60if (git is null && _mode is PipelineOutputDiffMode.Git)
Pipelines\PipelineOutputDiffOptions.cs (2)
19/// Gets or sets the membership and fingerprinting strategy. Defaults to <see cref="PipelineOutputDiffMode.Auto"/>. 21public PipelineOutputDiffMode Mode { get; set; }
Aspire.Hosting.Tests (99)
Pipelines\PipelineOutputComparisonTests.cs (7)
29var snapshotter = new DefaultPipelineOutputSnapshotter(new(), new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem })); 71})), new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem })); 91var first = new DefaultPipelineOutputSnapshotter(snapshotter, new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem })); 92var second = new DefaultPipelineOutputSnapshotter(snapshotter, new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem })); 124})), new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem })); 143var snapshotter = new DefaultPipelineOutputSnapshotter(new(), new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem })); 166var snapshotter = new DefaultPipelineOutputSnapshotter(new(), new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem }));
Pipelines\PipelineOutputDiffingTests.cs (15)
46Assert.Equal(PipelineOutputDiffMode.FileSystem, options.Mode); 53Assert.Equal(PipelineOutputDiffMode.Auto, options.Mode); 72options.Mode = PipelineOutputDiffMode.FileSystem; 79Assert.Equal(PipelineOutputDiffMode.FileSystem, options.Mode); 97options.Mode = PipelineOutputDiffMode.FileSystem; 191builder.Services.Configure<PipelineOutputDiffOptions>(options => options.Mode = PipelineOutputDiffMode.FileSystem); 560[InlineData(PipelineOutputDiffMode.Auto)] 561[InlineData(PipelineOutputDiffMode.Git)] 562[InlineData(PipelineOutputDiffMode.FileSystem)] 563public async Task ConfiguredIncludeOfIgnoredArtifactRequiresGitOptOut(PipelineOutputDiffMode mode) 585if (mode is PipelineOutputDiffMode.Auto or PipelineOutputDiffMode.Git) 925options.Mode = PipelineOutputDiffMode.FileSystem; 942options.Mode = requireGit ? PipelineOutputDiffMode.Git : PipelineOutputDiffMode.FileSystem;
Pipelines\PipelineOutputGitFingerprintTests.cs (2)
41var nativeSnapshotter = new DefaultPipelineOutputSnapshotter(new(), new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = useGit ? PipelineOutputDiffMode.Git : PipelineOutputDiffMode.FileSystem }));
Pipelines\PipelineOutputResolutionTests.cs (8)
104[InlineData(false, PipelineOutputDiffMode.Auto)] 105[InlineData(true, PipelineOutputDiffMode.Auto)] 106[InlineData(false, PipelineOutputDiffMode.FileSystem)] 107[InlineData(true, PipelineOutputDiffMode.FileSystem)] 108[InlineData(true, PipelineOutputDiffMode.Git)] 109public async Task WorktreeAvailabilityChangesBetweenCaptures(bool initiallyGit, PipelineOutputDiffMode mode) 140if (mode == PipelineOutputDiffMode.FileSystem) 147if (mode == PipelineOutputDiffMode.Auto)
Pipelines\PipelineOutputSelectionTests.cs (41)
19[InlineData(PipelineOutputDiffMode.FileSystem)] 20[InlineData(PipelineOutputDiffMode.Git)] 21[InlineData(PipelineOutputDiffMode.Auto)] 22public async Task OrderedRulesRestoreExcludedParentsBeforeGitFiltering(PipelineOutputDiffMode mode) 46Assert.Equal(mode is not PipelineOutputDiffMode.FileSystem ? new[] { readme } : new[] { readme, model }, selected.Order(PipelineOutputRoot.PathComparer)); 52[InlineData(false, PipelineOutputDiffMode.FileSystem)] 53[InlineData(false, PipelineOutputDiffMode.Git)] 54[InlineData(true, PipelineOutputDiffMode.FileSystem)] 55[InlineData(true, PipelineOutputDiffMode.Git)] 56[InlineData(false, PipelineOutputDiffMode.Auto)] 57[InlineData(true, PipelineOutputDiffMode.Auto)] 58public async Task ExplicitIncludesStillApplyGitToNewAndExistingIgnoredArtifacts(bool existsBefore, PipelineOutputDiffMode mode) 81if (mode is not PipelineOutputDiffMode.FileSystem) 94[InlineData(PipelineOutputDiffMode.FileSystem, false)] 95[InlineData(PipelineOutputDiffMode.FileSystem, true)] 96[InlineData(PipelineOutputDiffMode.Git, false)] 97[InlineData(PipelineOutputDiffMode.Git, true)] 98[InlineData(PipelineOutputDiffMode.Auto, false)] 99[InlineData(PipelineOutputDiffMode.Auto, true)] 100public async Task ConfiguredRulesReplaceImplicitIncludeAll(PipelineOutputDiffMode mode, bool includeJson) 118[InlineData(PipelineOutputDiffMode.Git)] 119[InlineData(PipelineOutputDiffMode.Auto)] 120public async Task GitMembershipExcludesRepositoryMetadata(PipelineOutputDiffMode mode) 133[InlineData(PipelineOutputDiffMode.FileSystem)] 134[InlineData(PipelineOutputDiffMode.Git)] 135[InlineData(PipelineOutputDiffMode.Auto)] 136public async Task NoRulesSelectAllFilesBeforeOrdinaryGitMembership(PipelineOutputDiffMode mode) 152Assert.Equal((mode is not PipelineOutputDiffMode.FileSystem ? new[] { json, source, tracked } : new[] { ignored, json, source, tracked }).Order(PipelineOutputRoot.PathComparer), selected.Order(PipelineOutputRoot.PathComparer)); 174var options = new PipelineOutputDiffOptions { Mode = useGit ? PipelineOutputDiffMode.Git : PipelineOutputDiffMode.FileSystem }; 281var options = new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem }; 284options.Mode = PipelineOutputDiffMode.Git; 318[InlineData(PipelineOutputDiffMode.Auto)] 319[InlineData(PipelineOutputDiffMode.Git)] 320public async Task GitMetadataOutsideConfiguredWorktreeUsesNonWorktreePolicy(PipelineOutputDiffMode mode) 346if (mode is PipelineOutputDiffMode.Git) 436Assert.Equal(PipelineOutputDiffMode.FileSystem, options.Mode); 453var mode = (PipelineOutputDiffMode)value; 509var options = new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem }; 531var options = new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem };
Pipelines\PipelineOutputStrategyTests.cs (26)
26var nativeSnapshotter = new DefaultPipelineOutputSnapshotter(new(), runner, Options.Create(new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem })); 48var options = new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.FileSystem }; 76var options = new PipelineOutputDiffOptions { Mode = PipelineOutputDiffMode.Git }; 106[InlineData(PipelineOutputDiffMode.Auto)] 107[InlineData(PipelineOutputDiffMode.FileSystem)] 108[InlineData(PipelineOutputDiffMode.Git)] 109public async Task BothMissingCapturesStayEmptyWithoutDiscovery(PipelineOutputDiffMode mode) 123[InlineData(PipelineOutputDiffMode.Auto)] 124[InlineData(PipelineOutputDiffMode.FileSystem)] 125[InlineData(PipelineOutputDiffMode.Git)] 126public async Task MissingBaselineReportsSelectedGeneratedFileAsAdded(PipelineOutputDiffMode mode) 132? mode is PipelineOutputDiffMode.Git ? new(0, "true\n\n", "") : new(128, "", "unavailable") 144Assert.Equal(mode is PipelineOutputDiffMode.FileSystem ? 0 : 1, runner.Calls.Count(args => args.Contains("rev-parse"))); 615[InlineData(false, false, PipelineOutputDiffMode.FileSystem)] 616[InlineData(true, false, PipelineOutputDiffMode.FileSystem)] 617[InlineData(false, true, PipelineOutputDiffMode.FileSystem)] 618[InlineData(true, true, PipelineOutputDiffMode.FileSystem)] 619[InlineData(false, false, PipelineOutputDiffMode.Git)] 620[InlineData(true, false, PipelineOutputDiffMode.Git)] 621[InlineData(false, true, PipelineOutputDiffMode.Git)] 622[InlineData(true, true, PipelineOutputDiffMode.Git)] 623[InlineData(false, false, PipelineOutputDiffMode.Auto)] 624[InlineData(true, false, PipelineOutputDiffMode.Auto)] 625[InlineData(false, true, PipelineOutputDiffMode.Auto)] 626[InlineData(true, true, PipelineOutputDiffMode.Auto)] 627public async Task ExplicitCallbacksOwnContentAndFailuresInsideWorktree(bool throughDi, bool throwing, PipelineOutputDiffMode mode)