mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
jobspec: fixup vault_grace deprecation
Followup to #7170 - Moved canonicalization of VaultGrace back into `api/` package. - Fixed tests. - Made docs styling consistent.
This commit is contained in:
@@ -531,6 +531,7 @@ func TestJobs_Canonicalize(t *testing.T) {
|
||||
LeftDelim: stringToPtr("{{"),
|
||||
RightDelim: stringToPtr("}}"),
|
||||
Envvars: boolToPtr(false),
|
||||
VaultGrace: timeToPtr(0),
|
||||
},
|
||||
{
|
||||
SourcePath: stringToPtr(""),
|
||||
@@ -543,6 +544,7 @@ func TestJobs_Canonicalize(t *testing.T) {
|
||||
LeftDelim: stringToPtr("{{"),
|
||||
RightDelim: stringToPtr("}}"),
|
||||
Envvars: boolToPtr(true),
|
||||
VaultGrace: timeToPtr(0),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -750,6 +750,11 @@ func (tmpl *Template) Canonicalize() {
|
||||
if tmpl.Envvars == nil {
|
||||
tmpl.Envvars = boolToPtr(false)
|
||||
}
|
||||
|
||||
//COMPAT(0.12) VaultGrace is deprecated and unused as of Vault 0.5
|
||||
if tmpl.VaultGrace == nil {
|
||||
tmpl.VaultGrace = timeToPtr(0)
|
||||
}
|
||||
}
|
||||
|
||||
type Vault struct {
|
||||
|
||||
Reference in New Issue
Block a user