Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ambiguity about runner mock's active vs paused status #826

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/RunnerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public Models.Runner Register(RunnerRegister request)
var project = Server.AllProjects.SingleOrDefault(p => string.Equals(p.RunnersToken, request.Token, StringComparison.Ordinal));
if (project != null)
{
var runner = project.AddRunner(null, request.Description, request.IsActive() ?? true, request.Locked ?? true, false, request.RunUntagged ?? false);
var runner = project.AddRunner(null, request.Description, request.Paused ?? false, request.Locked ?? true, false, request.RunUntagged ?? false);
return runner.ToClientRunner(Context.User);
}

Expand Down
8 changes: 4 additions & 4 deletions NGitLab.Mock/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,14 +390,14 @@ public Runner AddRunner(string name, string description, bool paused, bool locke
return runner;
}

public Runner AddRunner(string name, string description, bool active, bool locked, bool isShared)
public Runner AddRunner(string name, string description, bool paused, bool locked, bool isShared)
{
return AddRunner(name, description, active, locked, isShared, runUntagged: false, default);
return AddRunner(name, description, paused, locked, isShared, runUntagged: false, default);
}

public Runner AddRunner(string name, string description, bool active, bool locked, bool isShared, bool runUntagged)
public Runner AddRunner(string name, string description, bool paused, bool locked, bool isShared, bool runUntagged)
{
return AddRunner(name, description, active, locked, isShared, runUntagged, default);
return AddRunner(name, description, paused, locked, isShared, runUntagged, default);
}

public Project Fork(User user)
Expand Down
6 changes: 3 additions & 3 deletions NGitLab.Mock/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,8 @@ NGitLab.Mock.PipelineScheduleCollection.PipelineScheduleCollection(NGitLab.Mock.
NGitLab.Mock.Project
NGitLab.Mock.Project.AccessibleMergeRequests.get -> bool
NGitLab.Mock.Project.AccessibleMergeRequests.set -> void
NGitLab.Mock.Project.AddRunner(string name, string description, bool active, bool locked, bool isShared) -> NGitLab.Mock.Runner
NGitLab.Mock.Project.AddRunner(string name, string description, bool active, bool locked, bool isShared, bool runUntagged) -> NGitLab.Mock.Runner
NGitLab.Mock.Project.AddRunner(string name, string description, bool paused, bool locked, bool isShared) -> NGitLab.Mock.Runner
NGitLab.Mock.Project.AddRunner(string name, string description, bool paused, bool locked, bool isShared, bool runUntagged) -> NGitLab.Mock.Runner
NGitLab.Mock.Project.AddRunner(string name, string description, bool paused, bool locked, bool isShared, bool runUntagged, long id) -> NGitLab.Mock.Runner
NGitLab.Mock.Project.AllThreadsMustBeResolvedToMerge.get -> bool
NGitLab.Mock.Project.AllThreadsMustBeResolvedToMerge.set -> void
Expand Down Expand Up @@ -1375,4 +1375,4 @@ static NGitLab.Mock.TemporaryDirectory.Create() -> NGitLab.Mock.TemporaryDirecto
static NGitLab.Mock.TemporaryDirectory.DeleteDirectory(string path) -> void
static NGitLab.Mock.TemporaryDirectory.DeleteFile(string path) -> void
static NGitLab.Mock.UserRef.implicit operator NGitLab.Mock.UserRef(NGitLab.Mock.User user) -> NGitLab.Mock.UserRef
virtual NGitLab.Mock.Collection<T>.Add(T item) -> void
virtual NGitLab.Mock.Collection<T>.Add(T item) -> void
21 changes: 0 additions & 21 deletions NGitLab.Mock/RunnersExtensions.cs

This file was deleted.

Loading