summaryrefslogtreecommitdiffstats
path: root/sms-service/src/sms/handler/handler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'sms-service/src/sms/handler/handler_test.go')
-rw-r--r--sms-service/src/sms/handler/handler_test.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/sms-service/src/sms/handler/handler_test.go b/sms-service/src/sms/handler/handler_test.go
index 6b43a28..52637f3 100644
--- a/sms-service/src/sms/handler/handler_test.go
+++ b/sms-service/src/sms/handler/handler_test.go
@@ -95,7 +95,7 @@ func TestCreateRouter(t *testing.T) {
}
func TestStatusHandler(t *testing.T) {
- req, err := http.NewRequest("GET", "/v1/sms/status", nil)
+ req, err := http.NewRequest("GET", "/v1/sms/quorum/status", nil)
if err != nil {
t.Fatal(err)
}
@@ -127,6 +127,24 @@ func TestStatusHandler(t *testing.T) {
}
}
+func TestUnsealHandler(t *testing.T) {
+ req, err := http.NewRequest("GET", "/v1/sms/quorum/unseal", nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ rr := httptest.NewRecorder()
+ hr := http.HandlerFunc(h.statusHandler)
+
+ hr.ServeHTTP(rr, req)
+
+ ret := rr.Code
+ if ret != http.StatusOK {
+ t.Errorf("statusHandler returned wrong status code: %v vs %v",
+ ret, http.StatusOK)
+ }
+}
+
func TestCreateSecretDomainHandler(t *testing.T) {
body := `{"uuid":"123e4567-e89b-12d3-a456-426655440000","name":"testdomain"}`
reader := strings.NewReader(body)