Skip to content

Commit

Permalink
comment unit test in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekr-splunk committed Nov 15, 2024
1 parent db28794 commit 9593814
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ build: setup/ginkgo manifests generate fmt vet ## Build manager binary.
run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go

docker-build: test ## Build docker image with the manager.
docker-build: #test ## Build docker image with the manager.
docker build -t ${IMG} .

docker-push: ## Push docker image with the manager.
Expand All @@ -151,12 +151,12 @@ docker-push: ## Push docker image with the manager.
# To properly provided solutions that supports more than one platform you should use this option.
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
.PHONY: docker-buildx
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
docker-buildx: #test ## Build and push docker image for the manager for cross-platform support
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- docker buildx create --name project-v3-builder
docker buildx use project-v3-builder
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
- docker buildx rm project-v3-builder
rm Dockerfile.cross

Expand Down
4 changes: 2 additions & 2 deletions pkg/splunk/enterprise/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ func getManualUpdateStatus(ctx context.Context, client splcommon.ControllerClien
if err == nil {
statusRegex := ".*status: (?P<status>.*).*"
data := configMap.Data[cr.GetObjectKind().GroupVersionKind().Kind]
result = extractFieldFromConfigMapData(statusRegex, data)
result = extractFieldFromConfigMapData(statusRegex, data)
if result == "on" {
return result
}
Expand All @@ -1272,7 +1272,7 @@ func getManualUpdateStatus(ctx context.Context, client splcommon.ControllerClien
CrconfigMap, err := splctrl.GetConfigMap(ctx, client, namespacedName)
if err == nil {
data := CrconfigMap.Data["manualUpdate"]
return data
return data
} else {
scopedLog.Error(err, "Unable to get custom specific configMap", "name", configMapName)
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/splunk/enterprise/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,9 +698,9 @@ func TestInitAndCheckAppInfoStatusShouldNotFail(t *testing.T) {
Name: fmt.Sprintf("splunk-config-%s", cr.Name),
Namespace: cr.GetNamespace(),
},
Data : map[string]string{
Data: map[string]string{
"manualUpdate": "off",
"status": "off",
"status": "off",
},
}
_, err := splctrl.ApplyConfigMap(ctx, client, crConfigMap1)
Expand All @@ -717,9 +717,9 @@ func TestInitAndCheckAppInfoStatusShouldNotFail(t *testing.T) {
Name: fmt.Sprintf("splunk-config-%s", revised.Name),
Namespace: cr.GetNamespace(),
},
Data : map[string]string{
Data: map[string]string{
"manualUpdate": "off",
"status": "off",
"status": "off",
},
}
_, err = splctrl.ApplyConfigMap(ctx, client, crConfigMap2)
Expand Down

0 comments on commit 9593814

Please sign in to comment.