Skip to content

Commit 9663417

Browse files
authored
chore: remove unused test files and cicd workflows (#4732)
1 parent 0ab799a commit 9663417

File tree

3 files changed

+3
-139
lines changed

3 files changed

+3
-139
lines changed

.circleci/config.yml

+1-93
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ jobs:
565565
GOOS: << parameters.go_os >>
566566
GOARCH: << parameters.go_arch >>
567567
CLI_V1_LOCATION: ../binary-releases
568-
command: make build build-test install prefix=. -e
568+
command: make build install prefix=. -e
569569
- save_cache:
570570
key: go-build-{{ arch }}-{{ checksum "cliv2/go.sum" }}
571571
paths: [/home/circleci/go/pkg/mod]
@@ -724,70 +724,6 @@ jobs:
724724
- store_artifacts:
725725
path: ./cliv2/bin
726726

727-
v2-test-linux-amd64:
728-
executor: docker-node
729-
working_directory: /home/circleci/snyk
730-
steps:
731-
- checkout
732-
- attach_workspace:
733-
at: .
734-
- run:
735-
name: Run integration tests
736-
working_directory: ./cliv2
737-
environment:
738-
TEST_SNYK_EXECUTABLE_PATH: ./bin/snyk-linux
739-
command: |
740-
export SNYK_TOKEN="${SNYK_API_KEY}"
741-
./bin/snyk_tests_linux_amd64
742-
743-
v2-test-linux-arm64:
744-
executor: arm64
745-
working_directory: /home/circleci/snyk
746-
steps:
747-
- checkout
748-
- attach_workspace:
749-
at: .
750-
- run:
751-
name: Run integration tests
752-
working_directory: ./cliv2
753-
environment:
754-
TEST_SNYK_EXECUTABLE_PATH: ./bin/snyk-linux-arm64
755-
command: |
756-
export SNYK_TOKEN="${SNYK_API_KEY}"
757-
./bin/snyk_tests_linux_arm64
758-
759-
v2-test-darwin-amd64:
760-
executor: macos
761-
working_directory: /Users/distiller/snyk
762-
steps:
763-
- checkout
764-
- attach_workspace:
765-
at: .
766-
- run:
767-
name: Run integration tests
768-
working_directory: ./cliv2
769-
environment:
770-
TEST_SNYK_EXECUTABLE_PATH: ./bin/snyk-macos
771-
command: |
772-
export SNYK_TOKEN="${SNYK_API_KEY}"
773-
./bin/snyk_tests_darwin_amd64
774-
775-
v2-test-windows-amd64:
776-
executor: win/default
777-
working_directory: C:\Users\circleci\snyk
778-
steps:
779-
- checkout
780-
- attach_workspace:
781-
at: .
782-
- run:
783-
name: Run integration tests
784-
working_directory: ./cliv2
785-
environment:
786-
TEST_SNYK_EXECUTABLE_PATH: ./bin/snyk-win.exe
787-
command: |
788-
$env:SNYK_TOKEN = $env:SNYK_API_KEY
789-
./bin/snyk_tests_windows_amd64.exe
790-
791727
v2-sign-darwin-amd64:
792728
executor: macos
793729
working_directory: /Users/distiller/snyk
@@ -1058,34 +994,6 @@ workflows:
1058994
go_os: alpine
1059995
go_arch: amd64
1060996
c_compiler: /usr/bin/musl-gcc
1061-
- v2-test-linux-amd64:
1062-
filters:
1063-
branches:
1064-
ignore: master
1065-
name: v2 / Integration Tests (linux/amd64)
1066-
requires:
1067-
- v2 / Rename linux/amd64 artifact
1068-
- v2-test-linux-arm64:
1069-
filters:
1070-
branches:
1071-
ignore: master
1072-
name: v2 / Integration Tests (linux/arm64)
1073-
requires:
1074-
- v2 / Rename linux/arm64 artifact
1075-
- v2-test-darwin-amd64:
1076-
filters:
1077-
branches:
1078-
ignore: master
1079-
name: v2 / Integration Tests (darwin/amd64)
1080-
requires:
1081-
- v2 / Rename macos/amd64 artifact
1082-
- v2-test-windows-amd64:
1083-
filters:
1084-
branches:
1085-
ignore: master
1086-
name: v2 / Integration Tests (windows/amd64)
1087-
requires:
1088-
- v2 / Rename windows/amd64 artifact
1089997
# Tests for backwards compatibility with CLIv1
1090998
- test-alpine:
1091999
filters:

cliv2/Makefile

+2-19
Original file line numberDiff line numberDiff line change
@@ -164,24 +164,9 @@ $(BUILD_DIR)/$(V2_EXECUTABLE_NAME).$(HASH_STRING):
164164
@echo "$(LOG_PREFIX) Generating checksum ( $(BUILD_DIR)/$(V2_EXECUTABLE_NAME).$(HASH_STRING) )"
165165
@cd $(BUILD_DIR) && shasum -a $(HASH_ALGORITHM) --binary $(V2_EXECUTABLE_NAME) > $(V2_EXECUTABLE_NAME).$(HASH_STRING)
166166

167-
$(BUILD_DIR)/$(TEST_EXECUTABLE_NAME):
168-
@echo "$(LOG_PREFIX) Building test executable ( $(BUILD_DIR)/$(TEST_EXECUTABLE_NAME) )"
169-
@GOOS=$(_GO_OS) GOARCH=$(GOARCH) $(GOCMD) test -c -o $(BUILD_DIR)/$(TEST_EXECUTABLE_NAME) main_integration_test.go
170-
171167
.PHONY: build
172168
build: configure $(BUILD_DIR)/$(V2_EXECUTABLE_NAME) $(BUILD_DIR)/$(V2_EXECUTABLE_NAME).$(HASH_STRING)
173169

174-
.PHONY: build-test
175-
build-test: build-blackboxtest
176-
177-
.PHONY: build-blackboxtest
178-
build-blackboxtest: build $(BUILD_DIR)/$(TEST_EXECUTABLE_NAME)
179-
180-
.PHONY: blackboxtest
181-
blackboxtest: build-blackboxtest
182-
@echo "$(LOG_PREFIX) Running $@"
183-
TEST_SNYK_EXECUTABLE_PATH=$(TEST_SNYK_EXECUTABLE_PATH) $(BUILD_DIR)/$(TEST_EXECUTABLE_NAME) -test.v
184-
185170
$(WORKING_DIR)/internal/httpauth/generated/httpauth_generated_mock.go:
186171
@$(GOCMD) generate ./internal/httpauth/
187172

@@ -202,7 +187,7 @@ whiteboxtest:
202187
@$(GOCMD) test -cover ./...
203188

204189
.PHONY: test
205-
test: whiteboxtest blackboxtest
190+
test: whiteboxtest
206191

207192
.PHONY: lint
208193
lint:
@@ -252,7 +237,7 @@ clean-ts-cli:
252237
# build the full CLI (Typescript+Golang)
253238
.PHONY: build-full
254239
build-full: | build-ts-cli
255-
@$(MAKE) build build-test CLI_V1_VERSION_TAG=$(CLI_V1_VERSION_TAG) CLI_V1_LOCATION="$(CLI_V1_LOCATION)"
240+
@$(MAKE) build CLI_V1_VERSION_TAG=$(CLI_V1_VERSION_TAG) CLI_V1_LOCATION="$(CLI_V1_LOCATION)"
256241

257242
# clean the full CLI (Typescript+Golang)
258243
.PHONY: clean-full
@@ -279,7 +264,6 @@ install:
279264
@rm -f $(DESTDIR)$(bindir)/$(V2_EXECUTABLE_NAME)
280265
@cp $(BUILD_DIR)/$(V2_EXECUTABLE_NAME) $(DESTDIR)$(bindir)
281266
@cp $(BUILD_DIR)/$(V2_EXECUTABLE_NAME).$(HASH_STRING) $(DESTDIR)$(bindir)
282-
@cp $(BUILD_DIR)/$(TEST_EXECUTABLE_NAME) $(DESTDIR)$(bindir)
283267

284268
.PHONY: help
285269
help:
@@ -288,7 +272,6 @@ help:
288272
@echo "$(LOG_PREFIX) format"
289273
@echo "$(LOG_PREFIX) build"
290274
@echo "$(LOG_PREFIX) sign"
291-
@echo "$(LOG_PREFIX) build-test"
292275
@echo "$(LOG_PREFIX) test"
293276
@echo "$(LOG_PREFIX) test-signature"
294277
@echo "$(LOG_PREFIX) install"

cliv2/main_integration_test.go

-27
This file was deleted.

0 commit comments

Comments
 (0)