File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
environment/deploy/integration Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change 11package integration
22
33import (
4- "crypto/rand"
5- "encoding/hex"
64 "fmt"
7- "log"
85 "os"
96 "path/filepath"
107 "testing"
@@ -41,17 +38,11 @@ func kubeconfig() string {
4138 return ""
4239 }
4340
44- // If raw kubeconfig, export it directly
45- _ , err := os .Stat (kubeconfig )
41+ // If raw kubeconfig, export it directly, else export content
42+ kb , err := os .ReadFile (kubeconfig )
4643 if err == nil {
4744 return export ([]byte (kubeconfig ))
4845 }
49-
50- // Else cp
51- kb , err := os .ReadFile (kubeconfig )
52- if err != nil {
53- log .Fatal (err )
54- }
5546 return export (kb )
5647}
5748
@@ -61,9 +52,3 @@ func export(content []byte) string {
6152 _ = os .WriteFile (o , content , 0644 )
6253 return o
6354}
64-
65- func randName () string {
66- buf := make ([]byte , 8 )
67- rand .Read (buf )
68- return hex .EncodeToString (buf )
69- }
You can’t perform that action at this time.
0 commit comments