mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 19:44:52 +00:00
Feat: Integration tests
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/Infisical/infisical-merge/packages/models"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func HandleSendTestSecrets(cmd *cobra.Command, secrets []models.SingleEnvironmentVariable) {
|
||||
isTestMode := os.Getenv("TEST_MODE")
|
||||
|
||||
if isTestMode != "true" {
|
||||
return
|
||||
}
|
||||
|
||||
jsonOut, err := json.Marshal(secrets)
|
||||
if err != nil {
|
||||
HandleError(err, "Unable to marshal secrets")
|
||||
}
|
||||
|
||||
fmt.Fprint(cmd.OutOrStdout(), string(jsonOut))
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user