Skip to content

Commit

Permalink
Fixing some typos and verbiage. Fixing some of the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tonedefdev committed Apr 22, 2021
1 parent 212c8cd commit a1b797d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,12 @@ func main() {
app := &cli.App{
Name: "terracreds",
Usage: "a credential helper for Terraform Cloud/Enterprise that leverages the local operating system's credential manager for securely storing your API tokens.\n\n Visit https://github.com/tonedefdev/terracreds for more information",
UsageText: "terraform login",
UsageText: "Directly store credentials from Terraform using 'terraform login' or manually store them using 'terracreds create -n app.terraform.io -t myAPItoken'",
Version: version,
Commands: []*cli.Command{
{
Name: "create",
Usage: "Manually crete or update a credential object in the local operating sytem's credential manager that contains the Terraform Cloud/Enterprise authorization token",
Usage: "Manually create or update a credential object in the local operating sytem's credential manager that contains the Terraform Cloud/Enterprise authorization token",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "hostname",
Expand Down
5 changes: 3 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,16 @@ func TestGenerateTerracreds(t *testing.T) {
path := t.TempDir()
tfUser := path + "\\terraform.d"
NewDirectory(tfUser)
GenerateTerracreds(c, path, tfUser)
GenerateTerracreds(c)
}

func TestCreateCredential(t *testing.T) {
var cfg Config
var c *cli.Context
const hostname = "terracreds.test.io"
const apiToken = "9ZWRa0Ge0iQCtA.atlasv1.HpZAd8426rHFskeEFo3AzimnkfR1ldYy69zz0op0NJZ79et8nrgjw3lQfi0FyJ1o8iw"

CreateCredential(c, hostname, apiToken)
CreateCredential(c, hostname, apiToken, cfg)
cred, err := wincred.GetGenericCredential(hostname)
if err != nil {
t.Errorf("Expected credential object '%s' got '%s'", hostname, string(cred.CredentialBlob))
Expand Down

0 comments on commit a1b797d

Please sign in to comment.