Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operators #63

Open
wants to merge 59 commits into
base: main
Choose a base branch
from

create mocks for new types

9107f17
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

Operators #63

create mocks for new types
9107f17
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / Unit Tests Report succeeded Aug 23, 2023 in 1s

Unit Tests Report ✅

Tests passed successfully

✅ unit-tests.xml

93 tests were completed in 34s with 93 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
github.com/ditrit/badaas 6✅ 27ms
github.com/ditrit/badaas/configuration 33✅ 8ms
github.com/ditrit/badaas/controllers 4✅ 16ms
github.com/ditrit/badaas/httperrors 8✅ 5ms
github.com/ditrit/badaas/logger 3✅ 7ms
github.com/ditrit/badaas/mocks/configuration 0ms
github.com/ditrit/badaas/mocks/controllers 0ms
github.com/ditrit/badaas/mocks/httperrors 0ms
github.com/ditrit/badaas/mocks/orm 0ms
github.com/ditrit/badaas/mocks/router/middlewares 0ms
github.com/ditrit/badaas/mocks/services/sessionservice 0ms
github.com/ditrit/badaas/mocks/services/userservice 0ms
github.com/ditrit/badaas/orm 3✅ 10ms
github.com/ditrit/badaas/persistence 0ms
github.com/ditrit/badaas/persistence/gormdatabase 2✅ 8ms
github.com/ditrit/badaas/persistence/gormdatabase/gormzap 0ms
github.com/ditrit/badaas/persistence/models 3✅ 411ms
github.com/ditrit/badaas/persistence/models/dto 0ms
github.com/ditrit/badaas/router 2✅ 16ms
github.com/ditrit/badaas/router/middlewares 1✅ 9ms
github.com/ditrit/badaas/services 0ms
github.com/ditrit/badaas/services/auth/protocols/basicauth 2✅ 309ms
github.com/ditrit/badaas/services/sessionservice 18✅ 27ms
github.com/ditrit/badaas/services/userservice 6✅ 443ms
github.com/ditrit/badaas/utils 1✅ 3ms
github.com/ditrit/badaas/validators 1✅ 4ms

✅ github.com/ditrit/badaas

✅ TestInvokeFunctionsWithProvidedValues
✅ TestAddModulesAreExecuted
✅ TestCreateSuperUser
✅ TestCreateSuperUser_UserExists
✅ TestCreateSuperUser_UserServiceError
✅ TestCreateServer

✅ github.com/ditrit/badaas/configuration

✅ TestInitCommandsInitializerSetsAllKeysWithoutError
✅ TestInitCommandsInitializerReturnsErrorWhenErrorOnKeySet
✅ TestDatabaseConfigurationNewDBConfig
✅ TestDatabaseConfigurationGetPort
✅ TestDatabaseConfigurationGetHost
✅ TestDatabaseConfigurationGetUsername
✅ TestDatabaseConfigurationGetPassword
✅ TestDatabaseConfigurationGetSSLMode
✅ TestDatabaseConfigurationGetDBName
✅ TestDatabaseConfigurationGetRetryTime
✅ TestDatabaseConfigurationGetRetry
✅ TestDatabaseConfigurationLog
✅ TestHTTPServerConfigurationNewHttpServerConfiguration
✅ TestHTTPServerConfigurationGetPort
✅ TestHTTPServerConfigurationGetHost
✅ TestHTTPServerConfigurationGetAddr
✅ TestHTTPServerConfigurationGetMaxTimeout
✅ TestHTTPServerConfigurationLog
✅ TestInitializationConfigurationInitializationConfiguration
✅ TestInitializationConfigurationGetInit
✅ TestInitializationConfigurationLog
✅ TestLoggerConfigurationNewLoggerConfiguration
✅ TestLoggerConfigurationLoggerGetMode
✅ TestLoggerConfigurationLoggerRequestTemplate
✅ TestLoggerConfigurationLog
✅ TestPaginationConfigurationNewPaginationConfiguration
✅ TestPaginationConfigurationGetMaxElemPerPage
✅ TestPaginationConfigurationLog
✅ TestSessionConfigurationNewSessionConfiguration
✅ TestSessionConfigurationGetSessionDuration
✅ TestSessionConfigurationGetPullIntervall
✅ TestSessionConfigurationGetRollIntervall
✅ TestSessionConfigurationLog

✅ github.com/ditrit/badaas/controllers

✅ Test_BasicLoginHandler_MalformedRequest
✅ Test_BasicLoginHandler_UserNotFound
✅ Test_BasicLoginHandler_LoginFailed
✅ Test_BasicLoginHandler_LoginSuccess

✅ github.com/ditrit/badaas/httperrors

✅ TestTojson
✅ TestLog
✅ TestError
✅ TestWrite
✅ TestLogger
✅ TestNewErrorNotFound
✅ TestNewInternalServerError
✅ TestNewUnauthorizedError

✅ github.com/ditrit/badaas/logger

✅ TestInitializeDevelopmentLogger
✅ TestInitializeProductionLogger
✅ TestInitializeProductionLoggerNoConf

✅ github.com/ditrit/badaas/orm

✅ TestCreateDSN
✅ TestParseCorrectUUID
✅ TestParseIncorrectUUID

✅ github.com/ditrit/badaas/persistence/gormdatabase

✅ TestIsDuplicateError
✅ Test_isPostgresError

✅ github.com/ditrit/badaas/persistence/models

✅ TestNewSession
✅ TestExpired
✅ TestCanBeRolled

✅ github.com/ditrit/badaas/router

✅ TestAddInfoRoutes
✅ TestAddLoginRoutes

✅ github.com/ditrit/badaas/router/middlewares

✅ TestMiddlewareLogger

✅ github.com/ditrit/badaas/services/auth/protocols/basicauth

✅ TestSaltAndHashPassword
✅ TestCheckUserPassword

✅ github.com/ditrit/badaas/services/sessionservice

✅ TestLogInUser
✅ TestLogInUserDbError
✅ TestIsValid
✅ TestIsValid_SessionNotFound
✅ TestLogOutUser
✅ TestLogOutUserDbError
✅ TestLogOutUser_SessionNotFound
✅ TestRollSession
✅ TestRollSession_Expired
✅ TestRollSession_falseUUID
✅ TestRollSession_sessionNotFound
✅ Test_pullFromDB
✅ Test_pullFromDB_repoError
✅ Test_removeExpired
✅ Test_removeExpired_RepositoryError
✅ Test_get
✅ TestSessionCtx
✅ TestSessionCtxPanic

✅ github.com/ditrit/badaas/services/userservice

✅ TestNewUserService
✅ TestNewUserServiceDatabaseError
✅ TestNewUserServiceEmailNotValid
✅ TestGetUser
✅ TestGetUserNoUserFound
✅ TestGetUserWrongPassword

✅ github.com/ditrit/badaas/utils

✅ TestIntToSecond

✅ github.com/ditrit/badaas/validators

✅ TestValidEmail