From 98315d3c10b3f184841ef15216bbcb044757eb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Thu, 20 May 2021 17:53:18 -0300 Subject: [PATCH] Fix tests and create patchs directory --- Makefile | 3 ++- patch.diff => patchs/01.diff | 0 patchs/02.diff | 12 ++++++++++++ pkg/tsuru/model_cluster.go | 3 ++- 4 files changed, 16 insertions(+), 2 deletions(-) rename patch.diff => patchs/01.diff (100%) create mode 100644 patchs/02.diff diff --git a/Makefile b/Makefile index 0da3c17..954cbee 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,8 @@ process-files: find pkg/tsuru/ -name "*.go" ! -name 'custom_*' | xargs rm mv *.go pkg/tsuru gofmt -s -w pkg/tsuru/ - git apply patch.diff + git apply patchs/01.diff + git apply patchs/02.diff goimports -w pkg/tsuru/ go mod tidy diff --git a/patch.diff b/patchs/01.diff similarity index 100% rename from patch.diff rename to patchs/01.diff diff --git a/patchs/02.diff b/patchs/02.diff new file mode 100644 index 0000000..f1fc892 --- /dev/null +++ b/patchs/02.diff @@ -0,0 +1,12 @@ +diff --git a/pkg/tsuru/model_cluster.go b/pkg/tsuru/model_cluster.go +index 0e09e42..7934a7a 100644 +--- a/pkg/tsuru/model_cluster.go ++++ b/pkg/tsuru/model_cluster.go +@@ -21,5 +21,6 @@ type Cluster struct { + Local bool `json:"local,omitempty"` + CustomData map[string]string `json:"custom_data,omitempty"` + HttpProxy string `json:"httpProxy,omitempty"` +- KubeConfig ClusterKubeConfig `json:"kubeConfig,omitempty"` ++ ++ KubeConfig *ClusterKubeConfig `json:"kubeConfig,omitempty"` + } diff --git a/pkg/tsuru/model_cluster.go b/pkg/tsuru/model_cluster.go index 0e09e42..7934a7a 100644 --- a/pkg/tsuru/model_cluster.go +++ b/pkg/tsuru/model_cluster.go @@ -21,5 +21,6 @@ type Cluster struct { Local bool `json:"local,omitempty"` CustomData map[string]string `json:"custom_data,omitempty"` HttpProxy string `json:"httpProxy,omitempty"` - KubeConfig ClusterKubeConfig `json:"kubeConfig,omitempty"` + + KubeConfig *ClusterKubeConfig `json:"kubeConfig,omitempty"` }