Public Access
Add meeting inactivity safeguards
PR and Push Build/Test / build-and-test (push) Failing after 14m53s
PR and Push Build/Test / build-and-test (push) Failing after 14m53s
This commit is contained in:
@@ -179,6 +179,63 @@ public sealed class RecordingCoordinatorTests
|
||||
Assert.Equal(started.SummaryPath, artifactCleaner.DeletedArtifacts?.SummaryPath);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task StopDeletesDefaultOnlyArtifactsInsteadOfSummarizing()
|
||||
{
|
||||
var root = Path.Combine(Path.GetTempPath(), "meeting-assistant-tests", Guid.NewGuid().ToString("N"));
|
||||
try
|
||||
{
|
||||
var options = new MeetingAssistantOptions
|
||||
{
|
||||
Vault =
|
||||
{
|
||||
BaseFolder = root,
|
||||
MeetingNotesFolder = "Notes",
|
||||
TranscriptsFolder = "Transcripts",
|
||||
AssistantContextFolder = "Assistant Context",
|
||||
SummariesFolder = "Summaries"
|
||||
}
|
||||
};
|
||||
var audioSource = new ControlledAudioSource();
|
||||
var artifactCleaner = new CapturingMeetingRunArtifactCleaner();
|
||||
var summaryPipeline = new CapturingMeetingSummaryPipeline();
|
||||
var coordinator = new MeetingRecordingCoordinator(
|
||||
audioSource,
|
||||
new TestSpeechRecognitionPipelineFactory(new EchoStreamingTranscriptionProvider()),
|
||||
new VaultTranscriptStore(
|
||||
Options.Create(options),
|
||||
NullLogger<VaultTranscriptStore>.Instance),
|
||||
new MarkdownMeetingNoteStore(
|
||||
Options.Create(options),
|
||||
NullLogger<MarkdownMeetingNoteStore>.Instance),
|
||||
new CapturingMeetingNoteOpener(),
|
||||
new MarkdownMeetingArtifactStore(
|
||||
NullLogger<MarkdownMeetingArtifactStore>.Instance),
|
||||
new InMemoryRecordedAudioStore(),
|
||||
summaryPipeline,
|
||||
Options.Create(options),
|
||||
NullLogger<MeetingRecordingCoordinator>.Instance,
|
||||
artifactCleaner: artifactCleaner);
|
||||
|
||||
var started = await coordinator.StartAsync(CancellationToken.None);
|
||||
var stopped = await coordinator.StopAsync(CancellationToken.None);
|
||||
|
||||
Assert.False(stopped.IsRecording);
|
||||
Assert.Null(stopped.MeetingNotePath);
|
||||
Assert.False(summaryPipeline.WasRun);
|
||||
Assert.Equal(started.MeetingNotePath, artifactCleaner.DeletedArtifacts?.MeetingNotePath);
|
||||
Assert.Equal(started.TranscriptPath, artifactCleaner.DeletedArtifacts?.TranscriptPath);
|
||||
Assert.Equal(started.AssistantContextPath, artifactCleaner.DeletedArtifacts?.AssistantContextPath);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (Directory.Exists(root))
|
||||
{
|
||||
Directory.Delete(root, recursive: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task InactivitySafeguardStopsNormallyWhenPromptIsAcceptedAndUsesTranscriptEndTime()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user