@@ -458,13 +458,11 @@ func TestRunCommand_Run(t *testing.T) {
458458 }{
459459 "success, no secrets" : {
460460 command : RunCommand {
461- osEnv : func () []string { return []string {} },
462461 command : []string {"echo" , "test" },
463462 },
464463 },
465464 "missing secret" : {
466465 command : RunCommand {
467- osEnv : func () []string { return []string {} },
468466 command : []string {"echo" , "test" },
469467 envar : map [string ]string {
470468 "missing" : "path/to/unexisting/secret" ,
@@ -486,7 +484,6 @@ func TestRunCommand_Run(t *testing.T) {
486484 },
487485 "missing secret ignored" : {
488486 command : RunCommand {
489- osEnv : func () []string { return []string {} },
490487 command : []string {"echo" , "test" },
491488 envar : map [string ]string {
492489 "missing" : "path/to/unexisting/secret" ,
@@ -508,7 +505,6 @@ func TestRunCommand_Run(t *testing.T) {
508505 },
509506 "repo does not exist ignored" : {
510507 command : RunCommand {
511- osEnv : func () []string { return []string {} },
512508 command : []string {"echo" , "test" },
513509 envar : map [string ]string {
514510 "missing" : "unexisting/repo/secret" ,
@@ -530,7 +526,6 @@ func TestRunCommand_Run(t *testing.T) {
530526 },
531527 "invalid template var: start with a number" : {
532528 command : RunCommand {
533- osEnv : func () []string { return []string {} },
534529 envFile : "secrethub.env" ,
535530 templateVars : map [string ]string {
536531 "0foo" : "value" ,
@@ -541,7 +536,6 @@ func TestRunCommand_Run(t *testing.T) {
541536 },
542537 "invalid template var: illegal character" : {
543538 command : RunCommand {
544- osEnv : func () []string { return []string {} },
545539 envFile : "secrethub.env" ,
546540 templateVars : map [string ]string {
547541 "foo@bar" : "value" ,
@@ -552,9 +546,7 @@ func TestRunCommand_Run(t *testing.T) {
552546 },
553547 "os env secret not found" : {
554548 command : RunCommand {
555- osEnv : func () []string {
556- return []string {"TEST=secrethub://nonexistent/secret/path" }
557- },
549+ osEnv : []string {"TEST=secrethub://nonexistent/secret/path" },
558550 command : []string {"echo" , "test" },
559551 newClient : func () (secrethub.ClientInterface , error ) {
560552 return fakeclient.Client {
@@ -572,9 +564,7 @@ func TestRunCommand_Run(t *testing.T) {
572564 },
573565 "os env secret not found ignored" : {
574566 command : RunCommand {
575- osEnv : func () []string {
576- return []string {"TEST=secrethub://nonexistent/secret/path" }
577- },
567+ osEnv : []string {"TEST=secrethub://nonexistent/secret/path" },
578568 ignoreMissingSecrets : true ,
579569 command : []string {"echo" , "test" },
580570 newClient : func () (secrethub.ClientInterface , error ) {
0 commit comments