Skip to content

Commit defbe23

Browse files
fix rebase
Signed-off-by: yaroslavborbat <[email protected]>
1 parent 8335427 commit defbe23

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

internal/framework/provider/provider_configure.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ package provider
55

66
import (
77
"context"
8-
"fmt"
9-
"github.com/hashicorp/terraform-provider-kubernetes/util"
10-
"os"
11-
"path/filepath"
128

139
"github.com/hashicorp/terraform-plugin-framework/provider"
1410

kubernetes/provider.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ import (
77
"bytes"
88
"context"
99
"fmt"
10-
"github.com/hashicorp/terraform-provider-kubernetes/util"
1110
"log"
1211
"net/http"
1312
"os"
1413
"path/filepath"
1514
"strconv"
1615

16+
"github.com/hashicorp/terraform-provider-kubernetes/util"
17+
1718
"github.com/hashicorp/go-cty/cty"
1819
gversion "github.com/hashicorp/go-version"
1920
"github.com/mitchellh/go-homedir"
@@ -565,7 +566,7 @@ func initializeConfiguration(d *schema.ResourceData) (*restclient.Config, diag.D
565566
}
566567
log.Printf("[DEBUG] Using overridden context: %#v", overrides.Context)
567568
}
568-
569+
}
569570

570571
// Overriding with static configuration
571572
if v, ok := d.GetOk("insecure"); ok {

kubernetes/provider_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ func getEnv() *currentEnv {
186186

187187
func testAccPreCheck(t *testing.T) {
188188
ctx := context.TODO()
189+
hasEnvCfg := os.Getenv("KUBE_CONFIG_DATA_BASE64") != ""
189190
hasFileCfg := (os.Getenv("KUBE_CTX_AUTH_INFO") != "" && os.Getenv("KUBE_CTX_CLUSTER") != "") ||
190191
os.Getenv("KUBE_CTX") != "" ||
191192
os.Getenv("KUBE_CONFIG_PATH") != ""
@@ -195,7 +196,7 @@ func testAccPreCheck(t *testing.T) {
195196
os.Getenv("KUBE_CLUSTER_CA_CERT_DATA") != "") &&
196197
(hasUserCredentials || hasClientCert || os.Getenv("KUBE_TOKEN") != "")
197198

198-
if !hasFileCfg && !hasStaticCfg && !hasUserCredentials {
199+
if !hasEnvCfg && !hasFileCfg && !hasStaticCfg && !hasUserCredentials {
199200
t.Fatalf("File config (KUBE_CTX_AUTH_INFO and KUBE_CTX_CLUSTER) or static configuration"+
200201
"(%s) or (%s) must be set for acceptance tests",
201202
strings.Join([]string{

0 commit comments

Comments
 (0)