René's URL Explorer Experiment


Title: Add tests for generating, writing and reading the bootstrap secret by JohnAkindipe · Pull Request #3 · pullbase/pullbase · GitHub

Open Graph Title: Add tests for generating, writing and reading the bootstrap secret by JohnAkindipe · Pull Request #3 · pullbase/pullbase

X Title: Add tests for generating, writing and reading the bootstrap secret by JohnAkindipe · Pull Request #3 · pullbase/pullbase

Description: Add tests for bootstrap secret functions Summary Adds unit tests for the three bootstrap secret functions in server/cmd/server/main.go: generateBootstrapSecret, writeBootstrapSecretFile, and readBootstrapSecretFile. Tests added TestGenerateBootstrapSecret Tests generateBootstrapSecret(). Condition Expected behaviour Function is called successfully Returns no error Returned secret Is not an empty string Returned secret Is valid base64 RawURL encoding (i.e. can be decoded without error) TestWriteBootstrapSecretFile Tests writeBootstrapSecretFile() — happy path, writing to a file in the same directory. Condition Expected behaviour File is written successfully Returns no error Created file permissions 0600 (owner read/write only) File content when read back via readBootstrapSecretFile Equals the secret that was written TestWriteBootstrapSecretFileDifferentDirectory Tests writeBootstrapSecretFile() when the target file is in a subdirectory that does not yet exist. Condition Expected behaviour Parent directory does not exist Returns no error (directory is created automatically) Created directory permissions 0700 (owner read/write/execute only) TestWriteBootstrapSecretFileEmptyPath Tests writeBootstrapSecretFile() with an empty path string. Condition Expected behaviour Path argument is "" Returns a non-nil error TestReadBootstrapSecretFile (table-driven) Tests readBootstrapSecretFile() across four sub-cases: Sub-test Condition Expected behaviour path is invalid Path does not exist on disk Error containing "failed to stat path" path is directory Path points to a directory instead of a file Error containing "is a directory" file permissions are invalid File exists but has default (0666) permissions (group/world readable) Error containing "must not be group- or world-accessible" valid secret file File was written by writeBootstrapSecretFile (permissions 0600) No error; returned secret matches the one that was written Test results All new tests pass. Pre-existing tests also continue to pass: === RUN TestGeneratePrivateKey --- PASS: TestGeneratePrivateKey (0.00s) === RUN TestGenerateCertificate --- PASS: TestGenerateCertificate (0.00s) === RUN TestGenerateCertificateInvalidKey --- PASS: TestGenerateCertificateInvalidKey (0.00s) === RUN TestGenerateSelfSignedCerts --- PASS: TestGenerateSelfSignedCerts (0.00s) === RUN TestGenerateSelfSignedCertsDifferentDirectories --- PASS: TestGenerateSelfSignedCertsDifferentDirectories (0.00s) === RUN TestGenerateSelfSignedCertsCurrentDirectory --- PASS: TestGenerateSelfSignedCertsCurrentDirectory (0.00s) === RUN TestGenerateBootstrapSecret --- PASS: TestGenerateBootstrapSecret (0.00s) === RUN TestWriteBootstrapSecretFile --- PASS: TestWriteBootstrapSecretFile (0.32s) === RUN TestWriteBootstrapSecretFileDifferentDirectory --- PASS: TestWriteBootstrapSecretFileDifferentDirectory (0.38s) === RUN TestWriteBootstrapSecretFileEmptyPath --- PASS: TestWriteBootstrapSecretFileEmptyPath (0.00s) === RUN TestReadBootstrapSecretFile === RUN TestReadBootstrapSecretFile/path_is_invalid === RUN TestReadBootstrapSecretFile/path_is_directory === RUN TestReadBootstrapSecretFile/file_permissions_are_invalid === RUN TestReadBootstrapSecretFile/valid_secret_file --- PASS: TestReadBootstrapSecretFile (0.26s) --- PASS: TestReadBootstrapSecretFile/path_is_invalid (0.00s) --- PASS: TestReadBootstrapSecretFile/path_is_directory (0.00s) --- PASS: TestReadBootstrapSecretFile/file_permissions_are_invalid (0.00s) --- PASS: TestReadBootstrapSecretFile/valid_secret_file (0.25s) PASS ok github.com/pullbase/pullbase/server/cmd/server 0.979s Summary by CodeRabbit Bug Fixes Startup now shows a clearer error when a configured bootstrap secret file can’t be read, including the file path in the message. Improved handling for bootstrap secret file access issues, including invalid paths, directory paths, and permission problems. Tests Added coverage for bootstrap secret generation, file writing, and file reading. Added checks for output formatting and expected file/directory permissions when creating secret files.

Open Graph Description: Add tests for bootstrap secret functions Summary Adds unit tests for the three bootstrap secret functions in server/cmd/server/main.go: generateBootstrapSecret, writeBootstrapSecretFile, and readBo...

X Description: Add tests for bootstrap secret functions Summary Adds unit tests for the three bootstrap secret functions in server/cmd/server/main.go: generateBootstrapSecret, writeBootstrapSecretFile, and readBo...

Opengraph URL: https://github.com/pullbase/pullbase/pull/3

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a7e0b6ff-1f84-cad4-e469-22b28b0bc372
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD3CE:2463BD:F69009:13D43C1:6B00FF30
html-safe-nonce1b8b32b1f39333e2477b128ba36bbacb435da67ce3b2fbea8a977303d05c79ef
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0NFOjI0NjNCRDpGNjkwMDk6MTNENDNDMTo2QjAwRkYzMCIsInZpc2l0b3JfaWQiOiIzODM2NTQwMzUxMzg5MTcxNTA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca585289badd52370d063cb8a92cecce1342476d078c75a42d49da87f5a9112a5
hovercard-subject-tagpull_request:3947685983
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/pullbase/pullbase/pull/3/files
twitter:imagehttps://avatars.githubusercontent.com/u/85188938?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/85188938?s=400&v=4
og:image:altAdd tests for bootstrap secret functions Summary Adds unit tests for the three bootstrap secret functions in server/cmd/server/main.go: generateBootstrapSecret, writeBootstrapSecretFile, and readBo...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/pullbase/pullbase git https://github.com/pullbase/pullbase.git
octolytics-dimension-user_id209259101
octolytics-dimension-user_loginpullbase
octolytics-dimension-repository_id1127492151
octolytics-dimension-repository_nwopullbase/pullbase
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1127492151
octolytics-dimension-repository_network_root_nwopullbase/pullbase
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/pullbase/pullbase/pull/3/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpullbase%2Fpullbase%2Fpull%2F3%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpullbase%2Fpullbase%2Fpull%2F3%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=pullbase%2Fpullbase
Reloadhttps://github.com/pullbase/pullbase/pull/3/files
Reloadhttps://github.com/pullbase/pullbase/pull/3/files
Reloadhttps://github.com/pullbase/pullbase/pull/3/files
pullbasehttps://github.com/pullbase
pullbasehttps://github.com/pullbase/pullbase
Codehttps://github.com/pullbase/pullbase
Issueshttps://github.com/pullbase/pullbase/issues
Pull requestshttps://github.com/pullbase/pullbase/pulls
Actionshttps://github.com/pullbase/pullbase/actions
Projectshttps://github.com/pullbase/pullbase/projects
Security and qualityhttps://github.com/pullbase/pullbase/security
Insightshttps://github.com/pullbase/pullbase/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpullbase%2Fpullbase%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpullbase%2Fpullbase%2Fissues%2Fnew%2Fchoose
hacktivist123https://github.com/hacktivist123
pullbase:mainhttps://github.com/pullbase/pullbase/tree/main
JohnAkindipe:add-tests-for-bootstrap-secrethttps://github.com/JohnAkindipe/pullbase/tree/add-tests-for-bootstrap-secret
Conversation 4 https://github.com/pullbase/pullbase/pull/3
Commits 3 https://github.com/pullbase/pullbase/pull/3/commits
Checks 2 https://github.com/pullbase/pullbase/pull/3/checks
Files changed https://github.com/pullbase/pullbase/pull/3/files
Please reload this pagehttps://github.com/pullbase/pullbase/pull/3/files
Add tests for generating, writing and reading the bootstrap secret https://github.com/pullbase/pullbase/pull/3/files#top
Show all changes 3 commits https://github.com/pullbase/pullbase/pull/3/files
fbcf58d add generate bootstrap secret test JohnAkindipe Jun 25, 2026 https://github.com/pullbase/pullbase/pull/3/commits/fbcf58d8bdd682acb68bd7d2d1546192576f45d5
f45e8a7 add tests for generate, write, read bootstrap secret JohnAkindipe Jun 27, 2026 https://github.com/pullbase/pullbase/pull/3/commits/f45e8a7048afedd5f44c418e1308cefc0018ece2
15adfec make test for invalid file permissions deterministic JohnAkindipe Jun 27, 2026 https://github.com/pullbase/pullbase/pull/3/commits/15adfecbe76be4c02eccfb5a58e1411ad3845cf7
Clear filters https://github.com/pullbase/pullbase/pull/3/files
Please reload this pagehttps://github.com/pullbase/pullbase/pull/3/files
Please reload this pagehttps://github.com/pullbase/pullbase/pull/3/files
main.go https://github.com/pullbase/pullbase/pull/3/files#diff-399944dc356f03db990633978a3cc30ffd70f858d20404b645137a477f2900c9
main_test.go https://github.com/pullbase/pullbase/pull/3/files#diff-c3243abbef8a1e1a851c83e7c756188f0c06e23c0c34442ec3038ba2f54ee577
server/cmd/server/main.gohttps://github.com/pullbase/pullbase/pull/3/files#diff-399944dc356f03db990633978a3cc30ffd70f858d20404b645137a477f2900c9
View file https://github.com/JohnAkindipe/pullbase/blob/15adfecbe76be4c02eccfb5a58e1411ad3845cf7/server/cmd/server/main.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pullbase/pullbase/pull/3/{{ revealButtonHref }}
https://github.com/pullbase/pullbase/pull/3/files#diff-399944dc356f03db990633978a3cc30ffd70f858d20404b645137a477f2900c9
https://github.com/pullbase/pullbase/pull/3/files#diff-399944dc356f03db990633978a3cc30ffd70f858d20404b645137a477f2900c9
server/cmd/server/main_test.gohttps://github.com/pullbase/pullbase/pull/3/files#diff-c3243abbef8a1e1a851c83e7c756188f0c06e23c0c34442ec3038ba2f54ee577
View file https://github.com/JohnAkindipe/pullbase/blob/15adfecbe76be4c02eccfb5a58e1411ad3845cf7/server/cmd/server/main_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pullbase/pullbase/pull/3/{{ revealButtonHref }}
https://github.com/pullbase/pullbase/pull/3/files#diff-c3243abbef8a1e1a851c83e7c756188f0c06e23c0c34442ec3038ba2f54ee577
https://github.com/pullbase/pullbase/pull/3/files#diff-c3243abbef8a1e1a851c83e7c756188f0c06e23c0c34442ec3038ba2f54ee577
https://github.com/pullbase/pullbase/pull/3/files#diff-c3243abbef8a1e1a851c83e7c756188f0c06e23c0c34442ec3038ba2f54ee577
Please reload this pagehttps://github.com/pullbase/pullbase/pull/3/files
Please reload this pagehttps://github.com/pullbase/pullbase/pull/3/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.