Skip to content

Commit 9dd4f91

Browse files
committed
add install tests to normal validations
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
1 parent 9f93e99 commit 9dd4f91

2 files changed

Lines changed: 3 additions & 20 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ all: clean static-analysis test ## Run all linux-based checks (linting, license
4343
@printf '$(SUCCESS)All checks pass!$(RESET)\n'
4444

4545
.PHONY: test
46-
test: unit ## Run all tests
46+
test: unit install-test ## Run all tests
4747

4848
.PHONY: bootstrap-tools
4949
bootstrap-tools: $(TEMP_DIR)

test/install/Makefile

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ NAME=docker-sbom-cli-plugin
33
IMAGE_NAME=$(NAME)-install.sh-env
44
UBUNTU_IMAGE=$(IMAGE_NAME):ubuntu-20.04
55
ALPINE_IMAGE=$(IMAGE_NAME):alpine-3.6
6-
BUSYBOX_IMAGE=busybox:1.35
76

87
ENVS=./environments
98
DOCKER_RUN=docker run --rm -t -w /project/test/install -v /var/run/docker.sock:/var/run/docker.sock -v $(shell pwd)/../../:/project
@@ -30,7 +29,7 @@ test: unit acceptance
3029
ci-test-mac: unit-local acceptance-local
3130

3231
# note: do not add acceptance-local to this list
33-
acceptance: acceptance-ubuntu-20.04 acceptance-alpine-3.6 acceptance-busybox-1.35
32+
acceptance: acceptance-ubuntu-20.04 acceptance-alpine-3.6
3433

3534
unit: unit-ubuntu-20.04
3635

@@ -41,16 +40,14 @@ unit-local:
4140
acceptance-local:
4241
$(acceptance)
4342

44-
save: ubuntu-20.04 alpine-3.6 busybox-1.35
43+
save: ubuntu-20.04 alpine-3.6
4544
@mkdir cache || true
4645
docker image save -o cache/ubuntu-env.tar $(UBUNTU_IMAGE)
4746
docker image save -o cache/alpine-env.tar $(ALPINE_IMAGE)
48-
docker image save -o cache/busybox-env.tar $(BUSYBOX_IMAGE)
4947

5048
load:
5149
docker image load -i cache/ubuntu-env.tar
5250
docker image load -i cache/alpine-env.tar
53-
docker image load -i cache/busybox-env.tar
5451

5552
## UBUNTU #######################################################
5653

@@ -81,20 +78,6 @@ alpine-3.6:
8178
$(call title,alpine:3.6 - build environment)
8279
docker build -t $(ALPINE_IMAGE) -f $(ENVS)/Dockerfile-alpine-3.6 .
8380

84-
## BUSYBOX #######################################################
85-
86-
# note: unit tests cannot be run with sh (busybox dosn't have bash by default)
87-
88-
# note: busybox by default will not have cacerts, so you will get TLS warnings (we want to test under these conditions)
89-
90-
acceptance-busybox-1.35: busybox-1.35
91-
$(call title,busybox-1.35 - acceptance)
92-
$(DOCKER_RUN) $(BUSYBOX_IMAGE) \
93-
sh -c '$(WGET_INSTALL_SYFT) && $(ACCEPTANCE_CMD)'
94-
95-
busybox-1.35:
96-
$(call title,busybox-1.35 - build environment)
97-
docker pull $(BUSYBOX_IMAGE)
9881

9982
## For CI ########################################################
10083

0 commit comments

Comments
 (0)