Unit testing security rules with the Firebase Emulator Suite

0 Просмотры
Unit testing is like flossing; we all know we should be doing it, but not all of us actually are. And there’s no better subject to unit test than security rules, the main line of defense between your database and all of those untrustworthy clients. In this video, we'll teach you how to efficiently unit test your security rules using some helpful libraries and the latest Firebase emulator suite.

0:00 Introduction
1:50 Prerequisites and introducing the sample app
3:15 Introducing unit tests
5:11 Setting up the Firebase project
7:31 Creating our first unit test
8:46 Writing a unit test against Cloud Firestore
11:25 The principle of least privilege
14:04 Testing user-level security rules
18:03 Test-driven development and security rules
19:20 Refactoring
20:27 Security rules for queries
23:56 Reading a single document
24:39 The Emulator UI and adminApp
28:45 Database cleanup
30:05 Conclusion

Improvements to Firestore Security Rules blog post →
How does async/await work?
Unit Test Security Rules codelab →

Watch More:
Firebase Live 2020 playlist →
Subscribe to the Firebase channel →

Todd Kerpelman, Rachel Myers

#FirebaseLive event: Firebase Live 2020; re_ty: Publish;
Фантастика онлайн
Комментариев нет.