mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	Fix sys/health tests (#3762)
* Fix sys/health tests * Fix sys/health tests * Fix sys/health tests
This commit is contained in:
		 Calvin Leung Huang
					Calvin Leung Huang
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							78adac0a24
						
					
				
				
					commit
					202a7aec2c
				
			| @@ -23,9 +23,10 @@ func TestSysHealth_get(t *testing.T) { | ||||
|  | ||||
| 	var actual map[string]interface{} | ||||
| 	expected := map[string]interface{}{ | ||||
| 		"initialized": false, | ||||
| 		"sealed":      true, | ||||
| 		"standby":     true, | ||||
| 		"replication_dr_secondary": false, | ||||
| 		"initialized":              false, | ||||
| 		"sealed":                   true, | ||||
| 		"standby":                  true, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 501) | ||||
| 	testResponseBody(t, resp, &actual) | ||||
| @@ -53,9 +54,10 @@ func TestSysHealth_get(t *testing.T) { | ||||
|  | ||||
| 	actual = map[string]interface{}{} | ||||
| 	expected = map[string]interface{}{ | ||||
| 		"initialized": true, | ||||
| 		"sealed":      true, | ||||
| 		"standby":     true, | ||||
| 		"replication_dr_secondary": false, | ||||
| 		"initialized":              true, | ||||
| 		"sealed":                   true, | ||||
| 		"standby":                  true, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 503) | ||||
| 	testResponseBody(t, resp, &actual) | ||||
| @@ -87,9 +89,10 @@ func TestSysHealth_get(t *testing.T) { | ||||
|  | ||||
| 	actual = map[string]interface{}{} | ||||
| 	expected = map[string]interface{}{ | ||||
| 		"initialized": true, | ||||
| 		"sealed":      false, | ||||
| 		"standby":     false, | ||||
| 		"replication_dr_secondary": false, | ||||
| 		"initialized":              true, | ||||
| 		"sealed":                   false, | ||||
| 		"standby":                  false, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| 	testResponseBody(t, resp, &actual) | ||||
| @@ -127,9 +130,10 @@ func TestSysHealth_customcodes(t *testing.T) { | ||||
|  | ||||
| 	var actual map[string]interface{} | ||||
| 	expected := map[string]interface{}{ | ||||
| 		"initialized": false, | ||||
| 		"sealed":      true, | ||||
| 		"standby":     true, | ||||
| 		"replication_dr_secondary": false, | ||||
| 		"initialized":              false, | ||||
| 		"sealed":                   true, | ||||
| 		"standby":                  true, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 581) | ||||
| 	testResponseBody(t, resp, &actual) | ||||
| @@ -158,9 +162,10 @@ func TestSysHealth_customcodes(t *testing.T) { | ||||
|  | ||||
| 	actual = map[string]interface{}{} | ||||
| 	expected = map[string]interface{}{ | ||||
| 		"initialized": true, | ||||
| 		"sealed":      true, | ||||
| 		"standby":     true, | ||||
| 		"replication_dr_secondary": false, | ||||
| 		"initialized":              true, | ||||
| 		"sealed":                   true, | ||||
| 		"standby":                  true, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 523) | ||||
| 	testResponseBody(t, resp, &actual) | ||||
| @@ -193,9 +198,10 @@ func TestSysHealth_customcodes(t *testing.T) { | ||||
|  | ||||
| 	actual = map[string]interface{}{} | ||||
| 	expected = map[string]interface{}{ | ||||
| 		"initialized": true, | ||||
| 		"sealed":      false, | ||||
| 		"standby":     false, | ||||
| 		"replication_dr_secondary": false, | ||||
| 		"initialized":              true, | ||||
| 		"sealed":                   false, | ||||
| 		"standby":                  false, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 202) | ||||
| 	testResponseBody(t, resp, &actual) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user