Add missed description field for GET /sys/auth/:path/tune endpoint (#8193)

* fix #7623: add missed description field for GET /sys/auth/:path/tune endpoint

* fix #7623: allow empty description

* fix #7623: update tests with description field
This commit is contained in:
Vitaly Velikodny
2020-02-15 18:32:47 +00:00
committed by GitHub
parent 7d550e24da
commit 23cdc86761
4 changed files with 78 additions and 0 deletions

View File

@@ -293,6 +293,7 @@ func TestSysTuneAuth_nonHMACKeys(t *testing.T) {
"warnings": nil,
"auth": nil,
"data": map[string]interface{}{
"description": "token based credentials",
"default_lease_ttl": json.Number("2764800"),
"max_lease_ttl": json.Number("2764800"),
"force_no_cache": false,
@@ -300,6 +301,7 @@ func TestSysTuneAuth_nonHMACKeys(t *testing.T) {
"audit_non_hmac_response_keys": []interface{}{"bar"},
"token_type": "default-service",
},
"description": "token based credentials",
"default_lease_ttl": json.Number("2764800"),
"max_lease_ttl": json.Number("2764800"),
"force_no_cache": false,
@@ -336,11 +338,13 @@ func TestSysTuneAuth_nonHMACKeys(t *testing.T) {
"warnings": nil,
"auth": nil,
"data": map[string]interface{}{
"description": "token based credentials",
"default_lease_ttl": json.Number("2764800"),
"max_lease_ttl": json.Number("2764800"),
"force_no_cache": false,
"token_type": "default-service",
},
"description": "token based credentials",
"default_lease_ttl": json.Number("2764800"),
"max_lease_ttl": json.Number("2764800"),
"force_no_cache": false,
@@ -372,11 +376,13 @@ func TestSysTuneAuth_showUIMount(t *testing.T) {
"warnings": nil,
"auth": nil,
"data": map[string]interface{}{
"description": "token based credentials",
"default_lease_ttl": json.Number("2764800"),
"max_lease_ttl": json.Number("2764800"),
"force_no_cache": false,
"token_type": "default-service",
},
"description": "token based credentials",
"default_lease_ttl": json.Number("2764800"),
"max_lease_ttl": json.Number("2764800"),
"force_no_cache": false,
@@ -400,6 +406,7 @@ func TestSysTuneAuth_showUIMount(t *testing.T) {
actual = map[string]interface{}{}
expected = map[string]interface{}{
"description": "token based credentials",
"lease_id": "",
"renewable": false,
"lease_duration": json.Number("0"),
@@ -407,6 +414,7 @@ func TestSysTuneAuth_showUIMount(t *testing.T) {
"warnings": nil,
"auth": nil,
"data": map[string]interface{}{
"description": "token based credentials",
"default_lease_ttl": json.Number("2764800"),
"max_lease_ttl": json.Number("2764800"),
"force_no_cache": false,