mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 09:25:46 +03:00
api: Add Notes field to service checks (#22397)
Co-authored-by: Piotr Kazmierczak <470696+pkazmierczak@users.noreply.github.com>
This commit is contained in:
@@ -1624,6 +1624,7 @@ func ApiServicesToStructs(in []*api.Service, group bool) []*structs.Service {
|
||||
Interval: check.Interval,
|
||||
Timeout: check.Timeout,
|
||||
InitialStatus: check.InitialStatus,
|
||||
Notes: check.Notes,
|
||||
TLSServerName: check.TLSServerName,
|
||||
TLSSkipVerify: check.TLSSkipVerify,
|
||||
Header: check.Header,
|
||||
|
||||
@@ -2729,6 +2729,7 @@ func TestJobs_ApiJobToStructsJob(t *testing.T) {
|
||||
Interval: 4 * time.Second,
|
||||
Timeout: 2 * time.Second,
|
||||
InitialStatus: "ok",
|
||||
Notes: "this is a check",
|
||||
CheckRestart: &api.CheckRestart{
|
||||
Limit: 3,
|
||||
IgnoreWarnings: true,
|
||||
@@ -2838,6 +2839,7 @@ func TestJobs_ApiJobToStructsJob(t *testing.T) {
|
||||
Interval: 4 * time.Second,
|
||||
Timeout: 2 * time.Second,
|
||||
InitialStatus: "ok",
|
||||
Notes: "this is a check",
|
||||
SuccessBeforePassing: 3,
|
||||
FailuresBeforeCritical: 4,
|
||||
FailuresBeforeWarning: 2,
|
||||
@@ -3163,6 +3165,7 @@ func TestJobs_ApiJobToStructsJob(t *testing.T) {
|
||||
Interval: 4 * time.Second,
|
||||
Timeout: 2 * time.Second,
|
||||
InitialStatus: "ok",
|
||||
Notes: "this is a check",
|
||||
CheckRestart: &structs.CheckRestart{
|
||||
Grace: 11 * time.Second,
|
||||
Limit: 3,
|
||||
@@ -3274,6 +3277,7 @@ func TestJobs_ApiJobToStructsJob(t *testing.T) {
|
||||
Interval: 4 * time.Second,
|
||||
Timeout: 2 * time.Second,
|
||||
InitialStatus: "ok",
|
||||
Notes: "this is a check",
|
||||
GRPCService: "foo.Bar",
|
||||
GRPCUseTLS: true,
|
||||
SuccessBeforePassing: 3,
|
||||
|
||||
Reference in New Issue
Block a user