vmware / vmware/pinniped

Add integration test that launches a browser just like a user would

Open
#833 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Run a non-headless chrome browser using chrome driver
  2. Login to the IDP (i.e. create a session)
  3. Copy the chrome config directory (i.e. store the cookies)

Test phases (each number is a different test):

  1. 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)
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.