Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Jan 8, 2025
1 parent 8335427 commit defbe23
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 0 additions & 4 deletions internal/framework/provider/provider_configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ package provider

import (
"context"
"fmt"
"github.com/hashicorp/terraform-provider-kubernetes/util"
"os"
"path/filepath"

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

Expand Down
5 changes: 3 additions & 2 deletions kubernetes/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import (
"bytes"
"context"
"fmt"
"github.com/hashicorp/terraform-provider-kubernetes/util"
"log"
"net/http"
"os"
"path/filepath"
"strconv"

"github.com/hashicorp/terraform-provider-kubernetes/util"

"github.com/hashicorp/go-cty/cty"
gversion "github.com/hashicorp/go-version"
"github.com/mitchellh/go-homedir"
Expand Down Expand Up @@ -565,7 +566,7 @@ func initializeConfiguration(d *schema.ResourceData) (*restclient.Config, diag.D
}
log.Printf("[DEBUG] Using overridden context: %#v", overrides.Context)
}

}

// Overriding with static configuration
if v, ok := d.GetOk("insecure"); ok {
Expand Down
3 changes: 2 additions & 1 deletion kubernetes/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func getEnv() *currentEnv {

func testAccPreCheck(t *testing.T) {
ctx := context.TODO()
hasEnvCfg := os.Getenv("KUBE_CONFIG_DATA_BASE64") != ""
hasFileCfg := (os.Getenv("KUBE_CTX_AUTH_INFO") != "" && os.Getenv("KUBE_CTX_CLUSTER") != "") ||
os.Getenv("KUBE_CTX") != "" ||
os.Getenv("KUBE_CONFIG_PATH") != ""
Expand All @@ -195,7 +196,7 @@ func testAccPreCheck(t *testing.T) {
os.Getenv("KUBE_CLUSTER_CA_CERT_DATA") != "") &&
(hasUserCredentials || hasClientCert || os.Getenv("KUBE_TOKEN") != "")

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

0 comments on commit defbe23

Please sign in to comment.