Add integration test that launches a browser just like a user would
Open
Nobody has claimed this yet.
enhancement
priority/undecided
- Dominant language
- Go
- Stars
- 739
- Forks
- 85
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 1
Description
#780 pointed out a gap in our testing.
Here is a thought for a test that could give us the coverage we need:
Prep phase:
- Run a non-headless chrome browser using chrome driver
- Login to the IDP (i.e. create a session)
- Copy the chrome config directory (i.e. store the cookies)
Test phases (each number is a different test):
- Close the browser
- Try to use pinniped CLI to login, and arrange for the existing browser session to reused
- Assert login works (existing IDP session should prevent the need from browser control)
- Keep the browser open
- Try to use pinniped CLI to login, and arrange for the existing browser window and session to reused
- Assert login works (existing IDP session should prevent the need from browser control)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing #780 and the Pinniped CLI login flow described here, then determine how the non-headless Chrome and ChromeDriver session, cookies, and copied configuration should be handled. Done means separate tests cover both a closed browser and an open browser, reusing the existing IDP session and asserting that CLI login succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication, cli, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100