mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 10:39:07 +00:00
Added mailboxes as local data sources (#1022)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
This commit is contained in:
1 parent
93be539e50
commit
c4400c0ff6
343 files changed
+26051
-3122
No files matched your search
@@ -0,0 +1,36 @@
|
||||
using AIStudio.Tools.Mail;
|
||||
|
||||
namespace AIStudio.Tests.Tools.Mail;
|
||||
|
||||
/// <summary>
|
||||
/// Checks when two hosts count as the same mail server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The mailbox dialog recognizes a mail server of the organization by its host, and an
|
||||
/// organization which allows only its own mail servers decides by it whether AI Studio may connect.
|
||||
/// A host written another way must not look like a different server, and a different server must
|
||||
/// never pass for one of the organization.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public sealed class MailServerHostsTests
|
||||
{
|
||||
[TestCase("imap.example.org", "imap.example.org")]
|
||||
[TestCase("imap.example.org", "IMAP.Example.ORG")]
|
||||
[TestCase("imap.example.org", " imap.example.org ")]
|
||||
[TestCase("imap.example.org", "imap.example.org.")]
|
||||
[TestCase("imap.müller.example", "imap.xn--mller-kva.example")]
|
||||
[TestCase("192.0.2.10", "192.0.2.10")]
|
||||
public void HostsWrittenDifferentlyNameTheSameServer(string host, string otherHost) => Assert.That(MailServerHosts.AreSame(host, otherHost), Is.True);
|
||||
|
||||
[TestCase("imap.example.org", "imap.example.com")]
|
||||
[TestCase("imap.example.org", "mail.imap.example.org")]
|
||||
[TestCase("imap.example.org", "imap.example.org.evil.example")]
|
||||
[TestCase("imap.mueller.example", "imap.müller.example")]
|
||||
[TestCase("192.0.2.10", "192.0.2.11")]
|
||||
public void DifferentServersStayDifferent(string host, string otherHost) => Assert.That(MailServerHosts.AreSame(host, otherHost), Is.False);
|
||||
|
||||
[TestCase("", "")]
|
||||
[TestCase("imaps://imap.example.org", "imaps://imap.example.org")]
|
||||
[TestCase("imap.example.org:993", "imap.example.org:993")]
|
||||
public void WhatIsNoHostIsNoServer(string host, string otherHost) => Assert.That(MailServerHosts.AreSame(host, otherHost), Is.False, "Two equal texts which are no hosts must not count as a match, or an empty host would match an empty one.");
|
||||
}
|
||||
Reference in new issue
Block a user