testenvhelper

command
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 4 Imported by: 0

README

Test environment helper

This small program helps create the test environment.

First create an app following these instructions.

Set the GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET environment variables.

% export GOOGLE_CLIENT_ID=xxxx.apps.googleusercontent.com
% export GOOGLE_CLIENT_SECRET=xxxxxxxxxxxxxxxxxx
% ./testenvhelper
Go to https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=xxxx.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=state-token
Your code: xxxxxx
GOOGLE_TOKEN value: xxxxxxxxxxxxxxxxxx

Once you get the GOOGLE_TOKEN, you can set it locally, as secret in your CI.

Please note that you can also set a .env.json looking like this to define your credentials:

{
  "GOOGLE_CLIENT_ID": "xxxx.apps.googleusercontent.com",
  "GOOGLE_CLIENT_SECRET": "xxxxxxxxxxxxxxxxxx",
  "GOOGLE_TOKEN": "xxxxxxxxxxxxxxxxxx"
}

Documentation

Overview

This program helps the setup of credentials for tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL