1+ [v] success
2+ [x] failure
3+ [-] load
4+
15# Insyaallah, New tasks:
2- [] test main_test.go func setupTestSetCookie(...)
3- admin v
4- sugriwa x
5- subali x
6+ [] no debug for create models.User
7+
8+ example,
9+ [6.075ms] [rows:0] INSERT INTO `users` ... VALUES (...'unit-test','unit-test@exemple.com','$2a$10$wyzBl/d31ahlHVU52kgkT.cH1lXI9b0cmdiM9Gw2ciyY9C69bTLh6','Unit Test',0,'',0)
10+ ...
11+ time="2023-01-14T15:14:14+07:00" level=info msg="START request method POST for create user" route=/users/add username=
12+ time="2023-01-14T15:14:15+07:00" level=info msg="models.User: [+]success" route=/users/add user_success="{{... example example@example.com $2a$10$1cbJNsJNOXk4hwYYVtlUT.B0MwNwp4sRmI2pS9frCuC.0IBLyRsSO Example 0 0}" username=}}
613
14+ [] ...
715
816# Completed task:
9171. [-] testing session
10- [- ] Set-Cookie headers there isn't any: session
18+ [x ] Set-Cookie headers there isn't any: session
1119
12- [- ] 2 missing users
20+ [x ] 2 missing users
1321 Func: TestLogin
1422 Users:
1523 - admin - ok x
1624 - sugriwa - ok x
1725 - subali - ok x
1826 - ockibagusp - no v
1927
20- [- ] UndeclaredName: setupTestHandler v
28+ [x ] UndeclaredName: setupTestHandler v
2129 https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName
2230
2331 package tests v
2432 session.go x
2533 - for example: setupTestHandler() -> UndeclaredName
2634 move:
2735 - session.go to session_test.go v
36+
37+ [-] SetSession and GetAuth
38+ v login
39+ v user controller
40+ v home controller
41+ v about controller
42+ - admin controller
43+
44+ --- FAIL: TestUsersController
45+ - user_controller_test.go:253
46+ - user_controller_test.go:263
47+
48+ http://127.0.0.1:35351/users
49+ http://127.0.0.1:35351/users?admin=all
50+ http://127.0.0.1:35351/users?user=all
51+ http://127.0.0.1:35351/users?false=all
52+
53+ --- FAIL: TestCreateUserController
54+ users_[admin]_to_GET_create_it_success
55+ GET http://127.0.0.1:39181/users/add
56+
57+ - user_controller_test.go:518
58+
59+ --- FAIL: TestCreateUserController/user_[admin]_to_POST_create_it_success
60+
61+ POST http://127.0.0.1:39181/users/add
62+
63+ --- FAIL: TestCreateUserController/users_[admin]_to_POST_create_it_failure:_Duplicate_entry
64+
65+ --- FAIL: TestReadUserController
66+
67+ --- FAIL: TestUpdateUserController
68+ --- FAIL: TestUpdateUserController/users_[admin]_to_admin_GET_update_it_success:_id=1
69+
70+ --- FAIL: TestUpdateUserController/users_[admin]_to_user_GET_update_it_success:_id=2
71+
72+ --- FAIL: TestUpdateUserController/users_[admin]_to_admin_POST_update_it_success:_id=1
73+
74+ --- FAIL: TestUpdateUserByPasswordUserController
75+ --- FAIL: TestUpdateUserByPasswordUserController/users_[admin]_to_GET_update_user_by_password_it_success:_id=1
2876
29- 2. [x ] controller UpdateUser: validation
77+ 2. [v ] controller UpdateUser: validation
3078
31- 3. [x ] test controller DeteleUser: id=3
79+ 3. [v ] test controller DeteleUser: id=3
3280controllers/user_controller.go:678
3381
3482name: "users [subali] to [subali] DELETE it success: id=3",
@@ -40,4 +88,4 @@ time="2022-12-30T14:54:47+07:00" level=info msg="START request method GET for de
4088time="2022-12-30T14:54:47+07:00" level=warning msg="for GET to delete user without no-session [@route: /login]" route="/users/delete/:id -> id:1" username=
4189...
4290
43- 4. [x ] test without csrf
91+ 4. [v ] test without csrf
0 commit comments