Update test inputs

This commit is contained in:
Jan Eitzinger 2023-08-18 09:31:57 +02:00
parent 6185635aa9
commit 14c487c9e4
6 changed files with 17 additions and 4 deletions

View File

@ -4,6 +4,9 @@
"kind": "file", "kind": "file",
"path": "./var/job-archive" "path": "./var/job-archive"
}, },
"jwts": {
"max-age": "2m"
},
"clusters": [ "clusters": [
{ {
"name": "fritz", "name": "fritz",

View File

@ -43,7 +43,7 @@
"jwts": { "jwts": {
"cookieName": "", "cookieName": "",
"validateUser": false, "validateUser": false,
"max-age": 0, "max-age": "2m",
"trustedIssuer": "" "trustedIssuer": ""
}, },
"short-running-jobs-duration": 300 "short-running-jobs-duration": 300

View File

@ -39,6 +39,9 @@ func setup(t *testing.T) *api.RestApi {
"kind": "file", "kind": "file",
"path": "./var/job-archive" "path": "./var/job-archive"
}, },
"jwts": {
"max-age": "2m"
},
"clusters": [ "clusters": [
{ {
"name": "testcluster", "name": "testcluster",

View File

@ -42,6 +42,9 @@ func setup(t *testing.T) *repository.JobRepository {
"kind": "file", "kind": "file",
"path": "./var/job-archive" "path": "./var/job-archive"
}, },
"jwts": {
"max-age": "2m"
},
"clusters": [ "clusters": [
{ {
"name": "testcluster", "name": "testcluster",

View File

@ -22,6 +22,9 @@ func setupUserTest(t *testing.T) *UserCfgRepo {
"kind": "file", "kind": "file",
"path": "./var/job-archive" "path": "./var/job-archive"
}, },
"jwts": {
"max-age": "2m"
},
"clusters": [ "clusters": [
{ {
"name": "testcluster", "name": "testcluster",

View File

@ -11,6 +11,9 @@ import (
func TestValidateConfig(t *testing.T) { func TestValidateConfig(t *testing.T) {
json := []byte(`{ json := []byte(`{
"jwts": {
"max-age": "2m"
},
"clusters": [ "clusters": [
{ {
"name": "testcluster", "name": "testcluster",
@ -21,9 +24,7 @@ func TestValidateConfig(t *testing.T) {
"numNodes": { "from": 1, "to": 64 }, "numNodes": { "from": 1, "to": 64 },
"duration": { "from": 0, "to": 86400 }, "duration": { "from": 0, "to": 86400 },
"startTime": { "from": "2022-01-01T00:00:00Z", "to": null } "startTime": { "from": "2022-01-01T00:00:00Z", "to": null }
} }}]
}
]
}`) }`)
if err := Validate(Config, bytes.NewReader(json)); err != nil { if err := Validate(Config, bytes.NewReader(json)); err != nil {