-
Notifications
You must be signed in to change notification settings - Fork 36
/
DockerRegistryLoginFixture.cs
39 lines (29 loc) · 1.12 KB
/
DockerRegistryLoginFixture.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using Cake.Core;
using Cake.Core.Configuration;
using Cake.Core.Diagnostics;
using Cake.Core.IO;
using Cake.Testing.Fixtures;
using System;
namespace Cake.Docker.Tests.Build
{
public class DockerRegistryLoginFixture : ToolFixture<DockerRegistryLoginSettings>, ICakeContext
{
public string Path { get; set; }
IFileSystem ICakeContext.FileSystem => FileSystem;
ICakeEnvironment ICakeContext.Environment => Environment;
public ICakeLog Log => Log;
ICakeArguments ICakeContext.Arguments => throw new NotImplementedException();
IProcessRunner ICakeContext.ProcessRunner => ProcessRunner;
public IRegistry Registry => Registry;
public ICakeDataResolver Data => throw new NotImplementedException();
ICakeConfiguration ICakeContext.Configuration => throw new NotImplementedException();
public DockerRegistryLoginFixture(): base("docker")
{
ProcessRunner.Process.SetStandardOutput(Array.Empty<string>());
}
protected override void RunTool()
{
this.DockerLogin(Settings, Path);
}
}
}