mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
SMQ-2799 - Add support for basic auth for HTTP and WS adapters (#3049)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
This commit is contained in:
@@ -121,7 +121,6 @@ func TestSendMessage(t *testing.T) {
|
||||
msg: msg,
|
||||
secret: "",
|
||||
authRes: &grpcClientsV1.AuthnRes{Authenticated: false, Id: ""},
|
||||
authErr: svcerr.ErrAuthentication,
|
||||
svcErr: nil,
|
||||
err: errors.NewSDKErrorWithStatus(svcerr.ErrAuthentication, http.StatusUnauthorized),
|
||||
},
|
||||
@@ -132,7 +131,6 @@ func TestSendMessage(t *testing.T) {
|
||||
msg: msg,
|
||||
secret: "invalid",
|
||||
authRes: &grpcClientsV1.AuthnRes{Authenticated: false, Id: ""},
|
||||
authErr: svcerr.ErrAuthentication,
|
||||
svcErr: svcerr.ErrAuthentication,
|
||||
err: errors.NewSDKErrorWithStatus(svcerr.ErrAuthentication, http.StatusUnauthorized),
|
||||
},
|
||||
@@ -143,7 +141,6 @@ func TestSendMessage(t *testing.T) {
|
||||
msg: msg,
|
||||
secret: clientKey,
|
||||
authRes: &grpcClientsV1.AuthnRes{Authenticated: false, Id: ""},
|
||||
authErr: svcerr.ErrAuthentication,
|
||||
svcErr: svcerr.ErrAuthentication,
|
||||
err: errors.NewSDKErrorWithStatus(svcerr.ErrAuthentication, http.StatusUnauthorized),
|
||||
},
|
||||
@@ -176,7 +173,6 @@ func TestSendMessage(t *testing.T) {
|
||||
msg: msg,
|
||||
secret: clientKey,
|
||||
authRes: &grpcClientsV1.AuthnRes{Authenticated: false, Id: ""},
|
||||
authErr: svcerr.ErrAuthentication,
|
||||
svcErr: svcerr.ErrAuthentication,
|
||||
err: errors.NewSDKErrorWithStatus(svcerr.ErrAuthentication, http.StatusUnauthorized),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user