Этот материал находится в платной подписке. Оформи премиум подписку и смотри или слушай Introduction to Testing in Go (Golang), а также все другие курсы, прямо сейчас!
Премиум
  • Урок 1. 00:05:34
    Introduction
  • Урок 2. 00:01:02
    About me
  • Урок 3. 00:01:15
    Asking for help
  • Урок 4. 00:01:07
    Mistakes: we all make them.
  • Урок 5. 00:00:30
    What we'll cover in this section
  • Урок 6. 00:01:28
    Installing Go
  • Урок 7. 00:01:30
    Installing an IDE
  • Урок 8. 00:00:52
    Installing Docker
  • Урок 9. 00:01:04
    What we'll cover in this section
  • Урок 10. 00:06:21
    Creating a simple command line application
  • Урок 11. 00:07:58
    Writing a test for the isPrime() function
  • Урок 12. 00:07:21
    Improving our test with table tests
  • Урок 13. 00:02:30
    Checking test coverage
  • Урок 14. 00:02:49
    Completing our table tests
  • Урок 15. 00:11:26
    Improving our program to allow for user entered information
  • Урок 16. 00:07:10
    Writing a test for the prompt() function
  • Урок 17. 00:02:30
    Writing a test for the intro() function
  • Урок 18. 00:13:36
    Testing user input - writing a test for the checkNumbers() function
  • Урок 19. 00:05:58
    Updating readUserInput to make it testable, and then testing it
  • Урок 20. 00:00:45
    What we'll cover in this section
  • Урок 21. 00:01:38
    Running a single test
  • Урок 22. 00:02:00
    Running groups of tests (test suites)
  • Урок 23. 00:00:43
    What we'll cover in this section
  • Урок 24. 00:10:16
    Creating a simple web app
  • Урок 25. 00:12:00
    Setting up a route and handler for the home page
  • Урок 26. 00:11:29
    Testing our application routes
  • Урок 27. 00:10:01
    Testing Handlers: the Home handler
  • Урок 28. 00:12:23
    Setting up some simple middleware
  • Урок 29. 00:02:46
    Trying out our new addIPToContext middleware
  • Урок 30. 00:12:12
    Testing our middleware
  • Урок 31. 00:04:30
    Testing ipFromContext
  • Урок 32. 00:02:57
    Creating a login form
  • Урок 33. 00:04:44
    Setting up a route and stub handler for the login form
  • Урок 34. 00:00:35
    What we'll cover in this section
  • Урок 35. 00:09:33
    Setting up validation logic
  • Урок 36. 00:08:25
    Testing validation logic
  • Урок 37. 00:05:19
    Completing the tests for our validation logic
  • Урок 38. 00:03:27
    Trying out validation with our login form
  • Урок 39. 00:00:56
    What we'll cover in this section
  • Урок 40. 00:04:29
    Setting up a test enviroment with testing.M
  • Урок 41. 00:04:26
    Simplifying our templates using a layout
  • Урок 42. 00:02:02
    Installing a sessions package
  • Урок 43. 00:04:11
    Adding session to App config, and creating a SessionManager
  • Урок 44. 00:07:39
    Trying out our sessions
  • Урок 45. 00:11:48
    Updating our tests
  • Урок 46. 00:06:19
    Improving our test for the Home handler
  • Урок 47. 00:07:37
    Testing the render function with a bad template
  • Урок 48. 00:01:14
    What we'll cover in this section
  • Урок 49. 00:06:06
    Installing postgres with Docker
  • Урок 50. 00:10:27
    Setting up a database connection
  • Урок 51. 00:04:03
    Adding the data package for models and db package for database access
  • Урок 52. 00:03:35
    Making sure our web app can connect to our database
  • Урок 53. 00:01:58
    Closing our database pool gracefully, and resetting template path in tests
  • Урок 54. 00:08:29
    Creating a stub profile page
  • Урок 55. 00:06:54
    Adding messages to our template data and template files
  • Урок 56. 00:05:33
    Adding true authenication to the Login handler
  • Урок 57. 00:19:18
    Testing the Login handler
  • Урок 58. 00:04:25
    Adding Auth middleware
  • Урок 59. 00:06:54
    Testing Auth middleware
  • Урок 60. 00:09:29
    Updating routes & end-to-end tests
  • Урок 61. 00:01:57
    Problems with our Login handler test
  • Урок 62. 00:02:13
    What we'll cover in this section
  • Урок 63. 00:03:28
    Defining an interface type for our repository
  • Урок 64. 00:05:02
    Moving our database functions into a repository
  • Урок 65. 00:02:21
    Updating application config to use the database repository
  • Урок 66. 00:05:50
    Creating a testdb repository
  • Урок 67. 00:01:59
    Updating setup_test.go to use the test repository
  • Урок 68. 00:04:33
    Updating our tests to use the testdb repository
  • Урок 69. 00:01:23
    What we'll cover in this section
  • Урок 70. 00:08:06
    Getting started with testing our database
  • Урок 71. 00:11:04
    Getting our tests to spin up a docker image with Postgres
  • Урок 72. 00:08:55
    Populating our test database with empty tables
  • Урок 73. 00:06:22
    Testing InsertUser
  • Урок 74. 00:04:10
    Testing AllUsers
  • Урок 75. 00:05:12
    Testing GetUser and GetUserByEmail
  • Урок 76. 00:04:22
    Testing UpdateUser
  • Урок 77. 00:02:34
    Testing DeleteUser
  • Урок 78. 00:04:14
    Testing ResetUserPassword
  • Урок 79. 00:06:36
    Testing InsertUserImage
  • Урок 80. 00:02:56
    Using build tags to separate our integration tests
  • Урок 81. 00:00:57
    What we'll cover in this section
  • Урок 82. 00:05:44
    Adding a form to the Profile page
  • Урок 83. 00:05:42
    Adding the UserImage type to the User type
  • Урок 84. 00:06:53
    Updating the profile.page.gohtml file to look for a profile image
  • Урок 85. 00:14:29
    Writing a stub handler and a function to process profile image uploads
  • Урок 86. 00:04:51
    Implementing the UploadProfilePic handler
  • Урок 87. 00:04:29
    Trying things out
  • Урок 88. 00:15:22
    Testing image uploads
  • Урок 89. 00:09:52
    Testing our upload handler, with an alternative approach
  • Урок 90. 00:01:30
    What we'll cover in this section
  • Урок 91. 00:09:55
    Setting up an api with our existing code base
  • Урок 92. 00:05:49
    Adding stub handlers (endpoints) for our API
  • Урок 93. 00:05:23
    Trying out our REST API to make sure things work
  • Урок 94. 00:19:04
    Getting started with JWT Authentication
  • Урок 95. 00:10:39
    Generating token pairs
  • Урок 96. 00:04:50
    Implementing the authenticate handler
  • Урок 97. 00:04:53
    Trying out the authentication handler
  • Урок 98. 00:10:51
    Testing our authentication handler
  • Урок 99. 00:02:39
    Setting up a simple program to generate tokens for testing
  • Урок 100. 00:15:38
    Testing generating and validating tokens
  • Урок 101. 00:06:40
    Setting up our application middleware
  • Урок 102. 00:07:04
    Testing our CORS middleware
  • Урок 103. 00:08:18
    Testing our authRequired middleware
  • Урок 104. 00:02:16
    Add middleware to routes
  • Урок 105. 00:03:56
    Testing API routes
  • Урок 106. 00:09:41
    Implementing the handler to refresh tokens
  • Урок 107. 00:13:13
    Testing refreshing tokens
  • Урок 108. 00:07:22
    Completing the handlers that interact with the User type
  • Урок 109. 00:11:56
    Testing the handlers that interact with the User type
  • Урок 110. 00:08:55
    Finishing up testing handlers that interact with the data.User type
  • Урок 111. 00:01:21
    What we'll cover in this section
  • Урок 112. 00:05:18
    Serving HTML for our SPA
  • Урок 113. 00:16:16
    Authenticating users with our SPA
  • Урок 114. 00:08:40
    Setting a refresh token cookie when authenticating
  • Урок 115. 00:06:24
    Allowing users to refresh tokens using a cookie
  • Урок 116. 00:05:54
    Automatically refreshing tokens while the user is logged in
  • Урок 117. 00:04:37
    Getting a user from our simple SPA with the "Get User" button
  • Урок 118. 00:06:01
    Logging web users out
  • Урок 119. 00:08:59
    Testing refreshing tokens for Single Page Apps
  • Урок 120. 00:06:33
    Testing logging users out of our SPA