Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeout to opm registry serve #370

Merged
merged 3 commits into from
Jul 31, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')


.PHONY: all
all: clean test build
all: clean test build sanity-check

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

.PHONY: sanity-check
sanity-check:
# Build a container with the most recent binaries for this project.
# Does not include the database, which needs to be added separately.
docker build -f upstream-builder.Dockerfile -t sanity-container .

# TODO: add more invocations of the opm binary here

# serve the container for a second, using the bundles.db in testdata
docker run --rm -it -v "$(shell pwd)"/pkg/lib/indexer/testdata/:/database sanity-container \
./bin/opm registry serve --database /database/bundles.db --timeout-seconds 1

.PHONY: image
image:
docker build .