[tests] Make sampletester greener (#10713)

* [tests][sampletester] Add nuget.org single feed to sampletester

Since we no longer upstream to nuget.org our sampletester is not
able to find packages so we create a nuget config file with a single
source to nuget.org to fix it and still be compliant.

* [tests][sampletester] Remove ConferenceVision sample, it no longer exists

* [tests][sampletester] Double TimeOut for a couple of tests
This commit is contained in:
Alex Soto 2021-02-24 10:03:59 -05:00 коммит произвёл GitHub
Родитель 88505f85f1
Коммит f29592e7cf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 13 добавлений и 23 удалений

Просмотреть файл

@ -24,14 +24,21 @@ namespace Xamarin.Tests {
{
var nuget_conf = Path.Combine (root, "NuGet.config");
// We're cloning into a subdirectory of xamarin-macios, which already has a NuGet.config
// So create a Nuget.config that clears out any previous configuration, so that none of the
// sample tests pick up xamarin-macios' NuGet.config.
// So create a Nuget.config that clears out any previous configuration and adds nuget.org as
// single nuget source so that none of the sample tests pick up xamarin-macios' NuGet.config.
File.WriteAllText (nuget_conf,
@"<?xml version=""1.0"" encoding=""utf-8""?>
<configuration>
<config>
<clear />
</config>
<packageSources>
<clear />
<add key=""nuget.org"" value=""https://api.nuget.org/v3/index.json"" />
</packageSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
</configuration>
");
}

Просмотреть файл

@ -164,7 +164,8 @@ namespace Samples {
static IEnumerable<SampleTestData> GetSampleData ()
{
return GetSampleTestData (test_data, ORG, REPO, HASH, DEFAULT_BRANCH, DefaultTimeout);
// Samples.XamarinFormsTester.BuildSample(MarkupExtensions.iOS: Debug|iPhone) needs some extra time 10 minutes
return GetSampleTestData (test_data, ORG, REPO, HASH, DEFAULT_BRANCH, TimeSpan.FromMinutes (10));
}
}
@ -189,7 +190,8 @@ namespace Samples {
static IEnumerable<SampleTestData> GetSampleData ()
{
return GetSampleTestData (test_data, ORG, REPO, HASH, DEFAULT_BRANCH, DefaultTimeout);
// Samples.XamarinFormsBooksTester.BuildSample(FormattedTextToggle.iOS: Release|iPhone) needs some extra time 10 minutes
return GetSampleTestData (test_data, ORG, REPO, HASH, DEFAULT_BRANCH, TimeSpan.FromMinutes (10));
}
}
@ -249,23 +251,4 @@ namespace Samples {
return GetSampleTestData (test_data, ORG, REPO, HASH, DEFAULT_BRANCH, timeout: TimeSpan.FromMinutes (10));
}
}
[Category (CATEGORY)]
public class ConferenceVisionTester : SampleTester {
const string ORG = "microsoft";
const string REPO = "ConferenceVision";
const string CATEGORY = "microsoftconferencevision"; // categories can't contain dashes
const string HASH = "b477f99c9e23097b31168697b2c168e90c34fd4d";
const string DEFAULT_BRANCH = "master";
static Dictionary<string, SampleTest> test_data = new Dictionary<string, SampleTest> {
};
static IEnumerable<SampleTestData> GetSampleData ()
{
return GetSampleTestData (test_data, ORG, REPO, HASH, DEFAULT_BRANCH, DefaultTimeout);
}
}
}