Skip to content

Commit

Permalink
Fix a bunch of random tests with make tests-lint-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andremarianiello committed Dec 4, 2023
1 parent e6a2f88 commit 449e95f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 30 deletions.
3 changes: 1 addition & 2 deletions kubernetes/provider_ignore_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ func TestAccKubernetesIgnoreKubernetesMetadata_basic(t *testing.T) {
}

func testAccKubernetesIgnoreKubernetesMetadataProviderConfig(namespaceName string, ignoreKubernetesMetadata string) string {
return fmt.Sprintf(`
provider "kubernetes" {
return fmt.Sprintf(`provider "kubernetes" {
ignore_annotations = [
"%s",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ func testAccCheckKubernetesMutatingWebhookConfigurationExists(n string) resource
}

func testAccKubernetesMutatingWebhookConfigurationConfig_basic(name string) string {
return fmt.Sprintf(`
resource "kubernetes_mutating_webhook_configuration" "test" {
return fmt.Sprintf(`resource "kubernetes_mutating_webhook_configuration" "test" {
metadata {
name = %q
}
Expand Down Expand Up @@ -254,8 +253,7 @@ resource "kubernetes_mutating_webhook_configuration" "test" {
}

func testAccKubernetesMutatingWebhookConfigurationConfig_modified(name string) string {
return fmt.Sprintf(`
resource "kubernetes_mutating_webhook_configuration" "test" {
return fmt.Sprintf(`resource "kubernetes_mutating_webhook_configuration" "test" {
metadata {
name = %q
}
Expand Down Expand Up @@ -306,8 +304,7 @@ resource "kubernetes_mutating_webhook_configuration" "test" {
}

func testAccKubernetesMutatingWebhookConfigurationConfig_without_rules(name string) string {
return fmt.Sprintf(`
resource "kubernetes_mutating_webhook_configuration" "test" {
return fmt.Sprintf(`resource "kubernetes_mutating_webhook_configuration" "test" {
metadata {
name = %q
}
Expand Down
12 changes: 4 additions & 8 deletions kubernetes/resource_kubernetes_node_taint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ func testAccKubernetesNodeTaintExists(n string) resource.TestCheckFunc {
}

func testAccKubernetesNodeTaintConfig_basic() string {
return fmt.Sprintf(`
data "kubernetes_nodes" "test" {}
return fmt.Sprintf(`data "kubernetes_nodes" "test" {}
resource "kubernetes_node_taint" "test" {
metadata {
Expand All @@ -173,8 +172,7 @@ resource "kubernetes_node_taint" "test" {
}

func testAccKubernetesNodeTaintConfig_multipleBasic() string {
return fmt.Sprintf(`
data "kubernetes_nodes" "test" {}
return fmt.Sprintf(`data "kubernetes_nodes" "test" {}
resource "kubernetes_node_taint" "test" {
metadata {
Expand All @@ -201,8 +199,7 @@ resource "kubernetes_node_taint" "test" {
}

func testAccKubernetesNodeTaintConfig_updateTaint() string {
return fmt.Sprintf(`
data "kubernetes_nodes" "test" {}
return fmt.Sprintf(`data "kubernetes_nodes" "test" {}
resource "kubernetes_node_taint" "test" {
metadata {
Expand All @@ -229,8 +226,7 @@ resource "kubernetes_node_taint" "test" {
}

func testAccKubernetesNodeTaintConfig_removeTaint() string {
return fmt.Sprintf(`
data "kubernetes_nodes" "test" {}
return fmt.Sprintf(`data "kubernetes_nodes" "test" {}
resource "kubernetes_node_taint" "test" {
metadata {
Expand Down
6 changes: 2 additions & 4 deletions kubernetes/resource_kubernetes_pod_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1949,8 +1949,7 @@ func testAccKubernetesPodV1ConfigWithSecurityContextRunAsGroup(podName, imageNam
}

func testAccKubernetesPodV1ConfigWithSecurityContextSeccompProfile(podName, imageName, seccompProfileType string) string {
return fmt.Sprintf(`
resource "kubernetes_pod_v1" "test" {
return fmt.Sprintf(`resource "kubernetes_pod_v1" "test" {
metadata {
labels = {
app = "pod_label"
Expand Down Expand Up @@ -1982,8 +1981,7 @@ resource "kubernetes_pod_v1" "test" {
}

func testAccKubernetesPodV1ConfigWithSecurityContextSeccompProfileLocalhost(podName, imageName string) string {
return fmt.Sprintf(`
resource "kubernetes_pod_v1" "test" {
return fmt.Sprintf(`resource "kubernetes_pod_v1" "test" {
metadata {
labels = {
app = "pod_label"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ func testAccCheckKubernetesValidatingWebhookConfigurationV1Exists(n string) reso
}

func testAccKubernetesValidatingWebhookConfigurationV1Config_basic(name string) string {
return fmt.Sprintf(`
resource "kubernetes_validating_webhook_configuration_v1" "test" {
return fmt.Sprintf(`resource "kubernetes_validating_webhook_configuration_v1" "test" {
metadata {
name = %q
}
Expand Down Expand Up @@ -235,8 +234,7 @@ resource "kubernetes_validating_webhook_configuration_v1" "test" {
}

func testAccKubernetesValidatingWebhookConfigurationV1Config_modified(name string) string {
return fmt.Sprintf(`
resource "kubernetes_validating_webhook_configuration_v1" "test" {
return fmt.Sprintf(`resource "kubernetes_validating_webhook_configuration_v1" "test" {
metadata {
name = %q
}
Expand Down Expand Up @@ -291,8 +289,7 @@ resource "kubernetes_validating_webhook_configuration_v1" "test" {
}

func testAccKubernetesValidatingWebhookConfigurationV1Config_without_rules(name string) string {
return fmt.Sprintf(`
resource "kubernetes_validating_webhook_configuration_v1" "test" {
return fmt.Sprintf(`resource "kubernetes_validating_webhook_configuration_v1" "test" {
metadata {
name = %q
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ func testAccCheckKubernetesValidatingWebhookConfigurationV1Beta1Exists(n string)
}

func testAccKubernetesValidatingWebhookConfigurationV1Beta1Config_basic(name string) string {
return fmt.Sprintf(`
resource "kubernetes_validating_webhook_configuration" "test" {
return fmt.Sprintf(`resource "kubernetes_validating_webhook_configuration" "test" {
metadata {
name = %q
}
Expand Down Expand Up @@ -229,8 +228,7 @@ resource "kubernetes_validating_webhook_configuration" "test" {
}

func testAccKubernetesValidatingWebhookConfigurationV1Beta1Config_modified(name string) string {
return fmt.Sprintf(`
resource "kubernetes_validating_webhook_configuration" "test" {
return fmt.Sprintf(`resource "kubernetes_validating_webhook_configuration" "test" {
metadata {
name = %q
}
Expand Down

0 comments on commit 449e95f

Please sign in to comment.