[Makefile] Add "test-instance"; Add "help" #231
No reviewers
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#231
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "6543/go-sdk:make-add-test-instance"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
add make test-instance
so if you execute
make test-instance
you can test the sdk localy via
make test
in a second terminal@ -25,2 +42,4 @@
cd gitea && go test -cover -coverprofile coverage.out
.PHONY: test-instance
test-instance:
the indentation of the below lines in this task are inconsistent
@ -33,1 +69,4 @@
cd gitea && go build
.PHONY: local-test
local-test:
In drone yaml the proxy settings (
--noproxy
andexport HTTP_PROXY=""
) are needed due to drone agent settings, however on local they probably wouldn't be needed.--noproxy
still remains.@techknowlogick done
[Makefile] Add "test-instance"; Add "local-test"to [Makefile] Add "test-instance"; Add "local-test"; Add "help"@ -34,0 +71,4 @@
.PHONY: local-test
local-test:
@if [ -z "$(shell curl --noproxy "*" http://localhost:3000/api/v1/version 2> /dev/null)" ]; then echo "No test-instance detected!"; else \
export GITEA_SDK_TEST_URL="http://localhost:3000"; export GITEA_SDK_TEST_USERNAME="test01"; export GITEA_SDK_TEST_PASSWORD="test01"; \
perhaps we set these defaults at top of make file, and have them so they can be overridden.
@techknowlogick like this?
then
local-test
is useless ... and I can add change totest
...[Makefile] Add "test-instance"; Add "local-test"; Add "help"to [Makefile] Add "test-instance"; Add "help"@ -1,8 +1,33 @@
WORK_DIR := $(shell pwd)
ifeq ($(GITEA_SDK_TEST_URL), )
export GITEA_SDK_TEST_URL := http://localhost:3000
Make supports overriding in the following format
Where
EXAMPLE
would betesting
unless set outside makedidn't know :D
need review
I think running a full Gitea instance is a little overkill, but for the time being it's understandable unless we expect devs to download and use Docker.
ready to merge 🚀 ?
and yes this will be impruved in future ...