Skip to content

Commit 94097d1

Browse files
committedJul 1, 2020
Add sanity test for opm registry serve
1 parent a01036d commit 94097d1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed
 

‎Makefile

+13-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
99

1010

1111
.PHONY: all
12-
all: clean test build
12+
all: clean test build sanity-check
1313

1414
$(CMDS):
1515
$(GO) build $(extra_flags) -o $@ ./cmd/$(notdir $@)
@@ -28,6 +28,18 @@ static: build
2828
unit:
2929
$(GO) test $(SPECIFIC_UNIT_TEST) -count=1 -v -race ./pkg/...
3030

31+
.PHONY: sanity-check
32+
sanity-check:
33+
# Build a container with the most recent binaries for this project.
34+
# Does not include the database, which needs to be added separately.
35+
docker build -f upstream-builder.Dockerfile -t sanity-container .
36+
37+
# TODO: add more invocations of the opm binary here
38+
39+
# serve the container for a second, using the bundles.db in testdata
40+
docker run --rm -it -v "$(shell pwd)"/pkg/lib/indexer/testdata/:/database sanity-container \
41+
./bin/opm registry serve --database /database/bundles.db --timeout-seconds 1
42+
3143
.PHONY: image
3244
image:
3345
docker build .

0 commit comments

Comments
 (0)
Please sign in to comment.